Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 🐛 修复虚拟滚动下的footer渲染问题 #3965

Merged
merged 3 commits into from
Feb 23, 2024

Conversation

Cat1007
Copy link
Contributor

@Cat1007 Cat1007 commented Feb 23, 2024

🤔 这个 PR 的性质是?

  • 日常 bug 修复

💡 需求背景和解决方案

#3655

  1. 在虚拟滚动下,t-foot 位于 table 的底部而并非容器底部,随着新元素渲染,会随着滚动离开外部容器底部,采用类似 header 的处理,强制渲染 affixFooter,并隐藏 table 中的 t-foot,保留元素用于计算高度
  2. 计算用于撑开滚动高度的虚拟 div 的 translateY 时,只计算了内容高度,需要加上 footer 和 header,使得尾部的行可以正确滚动至可视区域
  3. 存在一个 this.isVirtual 的引用,看起来是错误的代码,修正并使用 this.virtualConfig.isVirtualScroll.value 替代

测试及问题复现用例
https://stackblitz.com/edit/ls47cs?file=package.json,src%2Fdemo.vue

📝 更新日志

  • fix(Table): 修正虚拟滚动下 footer 的实现

☑️ 请求合并前的自查清单

⚠️ 请自检并全部勾选全部选项⚠️

  • 文档已补充或无须补充
  • 代码演示已提供或无须提供
  • TypeScript 定义已补充或无须补充
  • Changelog 已提供或无须提供

Copy link
Contributor

github-actions bot commented Feb 23, 2024

完成

src/table/base-table.tsx Outdated Show resolved Hide resolved
@uyarn uyarn merged commit b7b1049 into Tencent:develop Feb 23, 2024
5 checks passed
@github-actions github-actions bot mentioned this pull request Mar 6, 2024
16 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants