From 8db718d2bd93190ebd12aaded2169f9a34996d28 Mon Sep 17 00:00:00 2001 From: neverland Date: Sat, 1 May 2021 16:44:02 +0800 Subject: [PATCH] fix(Tabs): setLine when popup reopened (#8642) --- src/tabs/Tabs.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tabs/Tabs.tsx b/src/tabs/Tabs.tsx index 3816ba6ae..7078a5a17 100644 --- a/src/tabs/Tabs.tsx +++ b/src/tabs/Tabs.tsx @@ -42,6 +42,7 @@ import { import { route, RouteProps } from '../composables/use-route'; import { useRefs } from '../composables/use-refs'; import { useExpose } from '../composables/use-expose'; +import { onPopupReopen } from '../composables/on-popup-reopen'; // Components import { Sticky } from '../sticky'; @@ -123,10 +124,8 @@ export default defineComponent({ const state = reactive({ inited: false, position: '', + lineStyle: {} as CSSProperties, currentIndex: -1, - lineStyle: { - backgroundColor: props.color, - } as CSSProperties, }); // whether the nav is scrollable @@ -443,6 +442,7 @@ export default defineComponent({ }); onActivated(setLine); + onPopupReopen(setLine); onMountedOrActivated(init); useEventListener('scroll', onScroll, { target: scroller.value });