Skip to content
On this page

确认框 confirm

举例使用

API

confirm

参数说明类型默认值
okShow是否显示确认按钮booleantrue
cancelShow是否显示取消按钮booleantrue
content内容string |VNode
onCancel关闭回掉函数(params) => Promisenull
onOk确认回掉函数(params) => Promisenull
title标题stringnull
--部分ant design modal组件的props----

以上函数调用后,会返回一个引用,可以通过该引用更新和关闭弹窗。

js

const modal = PlConfirm.info();

modal.update({
  title: '修改的标题',
  content: '修改的内容',
});

modal.destroy();

Released under the MIT License.