-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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(components): [el-table] rangeWidth dealing with loss of precision #12938
Conversation
👋 @lxy030988, seems like this is your first time contribution to element-plus.
|
Hello @lxy030988, thank you for contributing to element-plus, please see our guideline to see how to make contribution |
🧪 Playground Preview: https://element-plus.run/?pr=12938 |
@lxy030988 Could you please update the code with this suggestion? |
71bd55a
to
3ab31b4
Compare
@lxy030988 Thank you for your contribution! ❤️ |
…element-plus#12938) * fix(components): [el-table] rangeWidth use Math.ceil Closes element-plus#12687 * fix(components): [el-table] rangeWidth calculate Closes 12938 * fix(components): [el-table] offsetWidth calculate Closes element-plus#12938
Closes #12687
Please make sure these boxes are checked before submitting your PR, thank you!
dev
branch.Description
调整表格的列宽到显示tooltip的临界值(出现省略号),会出现tooltip效果不生效。
造成词现象的原因,rangeWidth 计算使用的四舍五入,丢失零点几像素的宽度。
修改方案:计算 rangeWidth 宽度 使用向上取整。
Related Issue
Fixes #12687
Explanation of Changes