fix: virtual list not update height for dynamic data

pull/5449/head
tangjinzhou 2022-04-06 15:53:09 +08:00
parent 48ade76046
commit 4a4670bdce
1 changed files with 1 additions and 2 deletions

View File

@ -11,10 +11,9 @@ export default function useHeights<T>(
onItemRemove?: ((item: T) => void) | null,
): [(item: T, instance: HTMLElement) => void, () => void, CacheMap, Ref<Symbol>] {
const instance = new Map<VNodeProps['key'], HTMLElement>();
let heights = new Map();
const heights = new Map();
const updatedMark = ref(Symbol('update'));
watch(mergedData, () => {
heights = new Map();
updatedMark.value = Symbol('update');
});
let heightUpdateId = 0;