diff --git a/src/components/root/index.vue b/src/components/root/index.vue index b0701da..ebec917 100644 --- a/src/components/root/index.vue +++ b/src/components/root/index.vue @@ -151,9 +151,9 @@ onMounted(() => { () => props.data, val => { if (val.length !== store.$data.length) { - $param.rootHeight = getHeight(); nextTick(() => { separateLineHeight.value = getHeight(); + $param.rootHeight = getHeight(); }); } } diff --git a/src/composables/useInView.ts b/src/composables/useInView.ts index 7acdb3f..f1c989a 100644 --- a/src/composables/useInView.ts +++ b/src/composables/useInView.ts @@ -36,7 +36,7 @@ export default () => { inView[i].hide || inView[i].flatIndex <= top.value || inView[i].flatIndex >= bottom.value || - store.$data.flatData[inView[i].flatIndex].id !== inView[i].id + !store.$data.flatData[inView[i].flatIndex].isSame(inView[i].data) ) { inView.splice(i, 1); }