Skip to content

Conversation

AiFu-o
Copy link

@AiFu-o AiFu-o commented Sep 10, 2025

修复Table组件在使用 fixed 时导致错位的问题,问题来自#412
原因分析:
当表格设置了整体宽度时,固定列对应的 <table> 实际宽度只等于固定列自身的宽度。
浏览器在渲染时会根据列宽自动计算行高,但由于 fixed 列的 <table> 宽度不足,内容可能 被截断或换行错误。
结果导致固定列显示的文字行数与主体表格不一致,从而产生错位。
解决方案:
将固定列 <table> 的宽度设置为 与主体表格相同。
这样浏览器在计算列宽和换行时,固定列与主体列保持一致,从而避免错位问题。

@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Sep 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant