zhengyiming
1 天以前 f34af9bbc5ec1a40fa5d9f658ea2face2fb13b19
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>
              ),
            }}