From f34af9bbc5ec1a40fa5d9f658ea2face2fb13b19 Mon Sep 17 00:00:00 2001
From: zhengyiming <540361168@qq.com>
Date: 星期三, 10 九月 2025 15:04:44 +0800
Subject: [PATCH] fix: 公告

---
 apps/taro/src/utils/common/message.tsx |   15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/apps/taro/src/utils/common/message.tsx b/apps/taro/src/utils/common/message.tsx
index 0ffb285..9a64b30 100644
--- a/apps/taro/src/utils/common/message.tsx
+++ b/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 (
@@ -49,7 +55,12 @@
                     onClose();
                     resolve(1);
                   }}
+                  //@ts-ignore
+                  onClickOverlay={() => {
+                    onClose();
+                  }}
                   confirmText={confirmText}
+                  showCancelBtn={showCancelBtn}
                 ></Model>
               ),
             }}
@@ -125,6 +136,4 @@
       );
     });
   }
-
-  
 }

--
Gitblit v1.9.1