From 92ae4a29c0b99aa65be6a71004b795ae2650f37c Mon Sep 17 00:00:00 2001 From: yongli Date: Tue, 7 Feb 2023 17:16:18 +0800 Subject: [PATCH] =?UTF-8?q?fix(cascader):=20=E4=BF=AE=E5=A4=8Dcascader?= =?UTF-8?q?=E7=BB=84=E4=BB=B6onClickTab=E4=BA=8B=E4=BB=B6=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E5=90=8C=E6=AD=A5activeTab=E7=9A=84=E5=80=BC=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=E9=80=89=E6=8B=A9=E5=BC=82=E5=B8=B8=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/cascader/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/cascader/index.ts b/packages/cascader/index.ts index b62b9532..ead37adf 100644 --- a/packages/cascader/index.ts +++ b/packages/cascader/index.ts @@ -193,6 +193,9 @@ VantComponent({ onClickTab(e) { const { index: tabIndex, title } = e.detail; this.$emit('click-tab', { title, tabIndex }); + this.setData({ + activeTab: tabIndex, + }); }, // 选中 onSelect(e) {