From 762ee921146f8557c2b9ce96df36ad85959c0f18 Mon Sep 17 00:00:00 2001
From: wupengfei <834520024@qq.com>
Date: 星期五, 24 十月 2025 11:30:19 +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