From 5cd618c9523ad30dccf858a00ff6d99a28de4187 Mon Sep 17 00:00:00 2001
From: zhengyiming <540361168@qq.com>
Date: 星期四, 11 九月 2025 10:24:35 +0800
Subject: [PATCH] feat: 公告
---
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