mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-23 18:00:27 +08:00
fix(Tabs): setLine when popup reopened (#8642)
This commit is contained in:
parent
b43822562f
commit
8db718d2bd
@ -42,6 +42,7 @@ import {
|
|||||||
import { route, RouteProps } from '../composables/use-route';
|
import { route, RouteProps } from '../composables/use-route';
|
||||||
import { useRefs } from '../composables/use-refs';
|
import { useRefs } from '../composables/use-refs';
|
||||||
import { useExpose } from '../composables/use-expose';
|
import { useExpose } from '../composables/use-expose';
|
||||||
|
import { onPopupReopen } from '../composables/on-popup-reopen';
|
||||||
|
|
||||||
// Components
|
// Components
|
||||||
import { Sticky } from '../sticky';
|
import { Sticky } from '../sticky';
|
||||||
@ -123,10 +124,8 @@ export default defineComponent({
|
|||||||
const state = reactive({
|
const state = reactive({
|
||||||
inited: false,
|
inited: false,
|
||||||
position: '',
|
position: '',
|
||||||
|
lineStyle: {} as CSSProperties,
|
||||||
currentIndex: -1,
|
currentIndex: -1,
|
||||||
lineStyle: {
|
|
||||||
backgroundColor: props.color,
|
|
||||||
} as CSSProperties,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// whether the nav is scrollable
|
// whether the nav is scrollable
|
||||||
@ -443,6 +442,7 @@ export default defineComponent({
|
|||||||
});
|
});
|
||||||
|
|
||||||
onActivated(setLine);
|
onActivated(setLine);
|
||||||
|
onPopupReopen(setLine);
|
||||||
onMountedOrActivated(init);
|
onMountedOrActivated(init);
|
||||||
useEventListener('scroll', onScroll, { target: scroller.value });
|
useEventListener('scroll', onScroll, { target: scroller.value });
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user