# showModal ^6.8
显示对话框
# 请求参数
| Prop | Type | Comment | 
|---|---|---|
| title | String | 提示的标题 | 
| content | String | 提示的内容 | 
| showCancel | Boolean | 是否取消按钮 | 
| cancelText | String | 取消按钮的文字 | 
| cancelColor | String | 取消按钮的文字颜色(16进制) | 
| confirmText | String | 确认按钮的文字 | 
| confirmColor | String | 确认按钮的文字颜色 | 
# 参数代码示例
    let params = {
      title: "test title",
      content: "test content",
      showCancel: false,
      cancelText: "Cancel",
      cancelColor: "#cccccc",
      confirmText: "Confirm",
      confirmColor: "#cccccc"
    }
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
# 接口调用示例
      let params = {
        title: 'test title',
        content: 'test content',
        showCancel: false,
        cancelText: 'Cancel',
        confirmText: 'Confirm'
      }
      this.$bridge
        .showModal(params)
        .then(res => {
          this.$toast(res)
        })
        .catch(err => {
          this.$toast(err)
        })
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# 返回参数
- 成功时返回
| Prop | Type | Value | 
|---|---|---|
| code | Number | 0 | 
| click | String | 取消/确认的文本 | 
