From ffe6d39f01a92b9e71ccb14038cfd337d0b166ca Mon Sep 17 00:00:00 2001
From: zhengyiming <540361168@qq.com>
Date: 星期四, 23 十月 2025 21:00:35 +0800
Subject: [PATCH] fix: bug
---
apps/bMiniApp/src/custom-tab-bar/index.tsx | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/apps/bMiniApp/src/custom-tab-bar/index.tsx b/apps/bMiniApp/src/custom-tab-bar/index.tsx
index dd8bbec..f28d758 100644
--- a/apps/bMiniApp/src/custom-tab-bar/index.tsx
+++ b/apps/bMiniApp/src/custom-tab-bar/index.tsx
@@ -68,8 +68,10 @@
const isLogin = useIsLogin();
const loginTipShowed = ref(false);
+ const isClicking = ref(false);
const switchTab = (url: string, index: number) => {
+ if (isClicking.value) return;
if (!isLogin.value && whitePageList.every((x) => x !== url)) {
if (!loginTipShowed.value) {
loginTipShowed.value = true;
@@ -85,9 +87,14 @@
}
return;
}
- Taro.switchTab({ url }).then(() => {
- system.setTabIndex(index);
- });
+ isClicking.value = true;
+ Taro.switchTab({ url })
+ .then(() => {
+ system.setTabIndex(index);
+ })
+ .finally(() => {
+ isClicking.value = false;
+ });
};
function goPublish() {
--
Gitblit v1.9.1