showModal 显示对话框

showModal ^6.8

显示对话框

#请求参数

Prop Type Comment
title String 提示的标题
content String 提示的内容
showCancel Boolean 是否取消按钮
cancelText String 取消按钮的文字
cancelColor String 取消按钮的文字颜色(16 进制)
confirmText String 确认按钮的文字
confirmColor String 确认按钮的文字颜色

#引入接口模块

import bridge from '@minix-iot/etsbridge-sdk'

#参数代码示例

let params = {
  title: 'test title',
  content: 'test content',
  showCancel: false,
  cancelText: 'Cancel',
  cancelColor: '#cccccc',
  confirmText: 'Confirm',
  confirmColor: '#cccccc',
}

#接口调用示例

bridge
  .showModal(params)
  .then((res) => {
    console.log(res)
  })
  .catch((err) => {
    console.log(err)
  })

#返回参数

  • 成功时返回
Prop Type Value
code Number 0
click String 取消/确认的文本
posted on 2024-12-27 09:27  AtlasLapetos  阅读(5)  评论(0)    收藏  举报