fix: table stickyscrollbar not show when keepalive change

pull/5502/head
tangjinzhou 3 years ago
parent 8ad95e75c2
commit 7a050e2498

@ -1,5 +1,14 @@
import type { Ref } from 'vue'; import type { Ref } from 'vue';
import { watchEffect, defineComponent, onBeforeUnmount, onMounted, ref, watch } from 'vue'; import {
nextTick,
onActivated,
watchEffect,
defineComponent,
onBeforeUnmount,
onMounted,
ref,
watch,
} from 'vue';
import addEventListenerWrap from '../vc-util/Dom/addEventListener'; import addEventListenerWrap from '../vc-util/Dom/addEventListener';
import { getOffset } from '../vc-util/Dom/css'; import { getOffset } from '../vc-util/Dom/css';
import classNames from '../_util/classNames'; import classNames from '../_util/classNames';
@ -137,6 +146,11 @@ export default defineComponent<StickyScrollBarProps>({
onMouseMoveListener = addEventListenerWrap(document.body, 'mousemove', onMouseMove, false); onMouseMoveListener = addEventListenerWrap(document.body, 'mousemove', onMouseMove, false);
onResizeListener = addEventListenerWrap(window, 'resize', onContainerScroll, false); onResizeListener = addEventListenerWrap(window, 'resize', onContainerScroll, false);
}); });
onActivated(() => {
nextTick(() => {
onContainerScroll();
});
});
onMounted(() => { onMounted(() => {
setTimeout(() => { setTimeout(() => {

Loading…
Cancel
Save