From 6e3ba5af63549afa0635d166527dd35bdc9e9414 Mon Sep 17 00:00:00 2001 From: neverland Date: Thu, 4 Nov 2021 20:57:17 +0800 Subject: [PATCH] fix(Tabs): should emit click-tab after before-change (#9805) --- packages/vant/src/tabs/Tabs.tsx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/vant/src/tabs/Tabs.tsx b/packages/vant/src/tabs/Tabs.tsx index 7e059a984..f3e4e424c 100644 --- a/packages/vant/src/tabs/Tabs.tsx +++ b/packages/vant/src/tabs/Tabs.tsx @@ -295,13 +295,6 @@ export default defineComponent({ const { title, disabled } = children[index]; const name = getTabName(children[index], index); - emit('click-tab', { - name, - title, - event, - disabled, - }); - if (disabled) { // @deprecated // should be removed in next major version @@ -321,6 +314,13 @@ export default defineComponent({ route(item as ComponentPublicInstance); } + + emit('click-tab', { + name, + title, + event, + disabled, + }); }; const onStickyScroll = (params: {