From 4f6e3379a3a1e0230c7e568b9e51eac86be02db3 Mon Sep 17 00:00:00 2001 From: H1d3rOne Date: Sat, 7 Mar 2026 21:33:10 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BC=98=E5=8C=96=E8=87=AA=E5=AE=9A?= =?UTF-8?q?=E4=B9=89tabBar=E7=BB=84=E4=BB=B6=EF=BC=8C=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加switchTab失败时的redirectTo回退 - 优化样式,添加安全区域适配 --- .../src/components/custom-tabbar/custom-tabbar.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/xuan-deduct-uniapp/src/components/custom-tabbar/custom-tabbar.vue b/xuan-deduct-uniapp/src/components/custom-tabbar/custom-tabbar.vue index 963b040..001a4fe 100644 --- a/xuan-deduct-uniapp/src/components/custom-tabbar/custom-tabbar.vue +++ b/xuan-deduct-uniapp/src/components/custom-tabbar/custom-tabbar.vue @@ -65,7 +65,13 @@ export default { this.currentIndex = index const path = this.tabList[index].pagePath uni.switchTab({ - url: path + url: path, + fail: (err) => { + console.log('switchTab fail:', err) + uni.redirectTo({ + url: path + }) + } }) } }