Skip to content

Commit

Permalink
fix(VirtualList): 修复 Select 结合 VirtualList 时滚动到底部不正确的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
ocean-gao committed Nov 4, 2024
1 parent 402fd64 commit 1059356
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion components/virtual-list/virtualList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ export default defineComponent({
if (!virtual) {
return getClientSize();
}
return virtual.getTotalSize() + (props.dataSources.length - virtual.sizes.size) * virtual.getEstimateSize() + getClientSize();
void virtual.sizes.size;
return virtual.getTotalSize() + (props.dataSources.length - virtual.sizes.size) * virtual.getEstimateSize();
});

const getUniqueIdFromDataSources = () => {
Expand Down
2 changes: 1 addition & 1 deletion docs/.vitepress/components/virtualList/vertical.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</div>
</template>
</FVirtualList>
<FButton @click="addMessage">添加消息{{ dataItems.length }}</FButton>
<FButton style="margin-top: 10px;" @click="addMessage">添加消息{{ dataItems.length }}</FButton>
</template>

<script>
Expand Down

0 comments on commit 1059356

Please sign in to comment.