Skip to content

Commit

Permalink
fix(GuDynamicHeightList): 计算展示数组的长度有误
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaius-98 committed Mar 6, 2024
1 parent ec17f3e commit 155dfec
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/components/GuDynamicHeightList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,7 @@ const onScroll = () => {
}
endIndex.value = i
} else {
let defineLen = allHeightList.value.length - startIndex.value
endIndex.value = defineLen + Math.ceil(height - (knownHeight.value - res) / preHeight.value)
endIndex.value = allHeightList.value.length + Math.ceil(height - (knownHeight.value - res) / preHeight.value)
}
}
showList.value = list.value.slice(startIndex.value, endIndex.value)
Expand Down

0 comments on commit 155dfec

Please sign in to comment.