From 062b5ef05cb4c2626647c0e14c55fb9ca090ac64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=80=92=E9=9C=89=E7=8B=90=E7=8B=B8?= Date: Sun, 16 May 2021 13:52:32 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=A0=B9=E6=8D=AE=E5=BD=93=E5=89=8D?= =?UTF-8?q?=E9=A1=B5=20path=EF=BC=8C=E5=88=87=E6=8D=A2=20tab=20=E9=80=89?= =?UTF-8?q?=E4=B8=AD=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/tab-bar/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tab-bar/index.js b/src/tab-bar/index.js index 73c601d2..5b7abddf 100644 --- a/src/tab-bar/index.js +++ b/src/tab-bar/index.js @@ -51,7 +51,7 @@ Component({ * 根据当前页 path,切换 tab 选中项 */ parseCurrentPage() { - const currentPagePath = '/' + getCurrentPages()[0].route; + const currentPagePath = '/' + getCurrentPages()[getCurrentPages().length-1].route; const list = this.data.list; let index;