Appearance
确认框 confirm
举例使用
API
confirm
参数 | 说明 | 类型 | 默认值 |
---|---|---|---|
okShow | 是否显示确认按钮 | boolean | true |
cancelShow | 是否显示取消按钮 | boolean | true |
content | 内容 | string |VNode | 无 |
onCancel | 关闭回掉函数 | (params) => Promise | null |
onOk | 确认回掉函数 | (params) => Promise | null |
title | 标题 | string | null |
-- | 部分ant design modal组件的props | -- | -- |
以上函数调用后,会返回一个引用,可以通过该引用更新和关闭弹窗。
js
const modal = PlConfirm.info();
modal.update({
title: '修改的标题',
content: '修改的内容',
});
modal.destroy();