From e16797980ad508312bc911745d9d9cbd15062d8f Mon Sep 17 00:00:00 2001 From: hdx Date: Fri, 2 Feb 2024 13:01:27 +0800 Subject: [PATCH] =?UTF-8?q?custom-tab-bar:=20=E8=B0=83=E6=95=B4=E5=9B=A0?= =?UTF-8?q?=E5=B7=AE=E5=BC=82=E5=AF=BC=E8=87=B4=E5=88=87=E6=8D=A2tab?= =?UTF-8?q?=E7=AE=AD=E5=A4=B4=E7=8A=B6=E6=80=81=E4=B8=8D=E6=AD=A3=E7=A1=AE?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/template/custom-tab-bar/custom-tab-bar.uvue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pages/template/custom-tab-bar/custom-tab-bar.uvue b/pages/template/custom-tab-bar/custom-tab-bar.uvue index c633bdc1..bf159776 100644 --- a/pages/template/custom-tab-bar/custom-tab-bar.uvue +++ b/pages/template/custom-tab-bar/custom-tab-bar.uvue @@ -80,10 +80,11 @@ }, methods: { onTabClick(index : number) { - this.setSelectedIndex(index); - if (index == 0) { + if (this.selectedIndex == index && index == 0) { + this.displayArrow = false; (this.$refs["tab1"]! as ComponentPublicInstance).$callMethod('scrollTop', 0) } + this.setSelectedIndex(index); }, onTabPageEvent(top : number) { this.displayArrow = top > this.tabViewHeight -- GitLab