Alert 类
警告框
变量
_priveta_class_name : string
name : string
方法
title
设置警告框标题
参数
- title : string 标题
返回值
- : Alert
title
获取警告框标题
返回值
- 警告框标题 : string
message
设置警告信息
参数
- msg : string 警告信息
返回值
- : Alert
message
获取警告信息
返回值
- 警告信息 : string
setCancel
设置取消按钮文案和回调
点击取消按钮回调
参数
- cancelText : string 取消按钮文案
- callback : function()
返回值
- : Alert
setOk
设置确定按钮文案和回调
点击确定按钮回调
参数
- okText : string 确定按钮文案
- callback : function()
返回值
- : Alert
setButtonList
设置多按钮文案和回调
function(idx)...end
回调被点击按钮索引
参数
返回值
- : Alert
setSingleButton
设置单按钮文案和回调
点击回调
参数
- singleBtnText : string 按钮文案
- callback : function()
返回值
- : Alert
show
展示弹框
返回值
- : Alert
dismiss
销毁弹框
返回值
- : Alert