wupengfei
2 天以前 51bcadcc5ece12fc430f0f09bf649326360febb7
packages/utils/message.tsx
@@ -25,11 +25,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 (
@@ -42,6 +48,7 @@
                  title={title}
                  visible={open.value}
                  content={message}
                  showCancelBtn={showCancelBtn}
                  onCancel={() => {
                    onClose();
                    reject();