# Function: showModal

showModal(params: ShowModalParams): Promise‹ShowModalRes

显示模态对话框

# 参数:

属性 类型 描述
params ShowModalParams 显示模态对话框参数

ShowModalParams

属性 类型 描述
cancelColor? string 取消按钮的文字颜色,必须是 16 进制格式的颜色字符串 有乐平台不支持设置按钮颜色
cancelText? string 取消按钮的文字,最多 4 个字符
confirmColor? string 确认按钮的文字颜色,必须是 16 进制格式的颜色字符串 有乐平台不支持设置按钮颜色
confirmText? string 确认按钮的文字,最多 4 个字符
content? string 提示的内容
key? number 原生直接回传,调用该弹窗接口传递一个唯一的key值,接口回调传回同一key值标记该回调为该弹窗接口的 仅有乐平台可用
showCancel? boolean 是否显示取消按钮
title string 提示的标题
complete? Method 接口调用结束的回调函数(调用成功、失败都会执行)
fail? Method 接口调用失败的回调函数
success? Method 接口调用成功的回调函数

# 返回值:

Promise‹ShowModalRes