fix(Tabs): should emit click-tab after before-change (#9805)

This commit is contained in:
neverland 2021-11-04 20:57:17 +08:00 committed by GitHub
parent f57205f7de
commit 6e3ba5af63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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<RouteProps>);
}
emit('click-tab', {
name,
title,
event,
disabled,
});
};
const onStickyScroll = (params: {