We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 70d3cdc commit 93fd3dcCopy full SHA for 93fd3dc
packages/devui-vue/devui/virtual-list/src/virtual-list.tsx
@@ -235,15 +235,16 @@ export default defineComponent({
235
syncScrollTop(newTop);
236
};
237
238
+ const oldScrollTop = ref(0);
239
const onComponentScroll = (e: UIEvent) => {
240
const { scrollTop: newScrollTop } = e.currentTarget as Element;
241
if (Math.abs(newScrollTop - state.scrollTop) >= 1) {
242
syncScrollTop(newScrollTop);
243
}
-
244
- if (Math.abs(newScrollTop - state.scrollTop) !== 0) {
+ if (oldScrollTop.value) {
245
barRef?.value?.onShowBar?.();
246
247
+ oldScrollTop.value = newScrollTop;
248
ctx.emit('scroll', e);
249
250
0 commit comments