confirm

import { MDialog } from "@yl/super-jssdk"

MDialog.confirm(optional)

参数说明

参数 类型 必填 作用
optional Object 必填参数

optional

参数 类型 必填 作用
message string 弹框内容
callback function 弹框取消时的回调函数
options Object 自定义参数

options

参数 类型 必填 作用
title string 弹框标题,默认 Alert
buttonLabels array 弹框按钮文字,默认 ['OK', 'Cancel']

返回说明

参数 类型 作用
resolve() Function 成功回调
reject(err) Function 失败回调,err为详细错误信息,是一个json对象,例如:{"errCode":-1,"errMsg":"出错啦"}

代码示例


MDialog.confirm({message: 'test'})
  .catch(err => {
    console.log('插件调用失败:', err)
  })

results matching ""

    No results matching ""