apps/taro/src/utils/common/message.tsx
@@ -24,11 +24,17 @@ title?: string; message?: string | VNode; confirmText?: string; showCancelBtn?: boolean; }; export class Message { static confirm(options: ConfirmOptions = {}) { const { title = '提示', message = '确定要删除该数据吗?', confirmText = '确认' } = options; const { title = '提示', message = '确定要删除该数据吗?', confirmText = '确认', showCancelBtn = true, } = options; return new Promise((resolve, reject) => { Portal.add((key) => { return ( @@ -54,6 +60,7 @@ onClose(); }} confirmText={confirmText} showCancelBtn={showCancelBtn} ></Model> ), }}