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: Table组件列错位的问题 #18827

Closed
wants to merge 1 commit into from

Conversation

xingleibinghun
Copy link

🤔 这个变动的性质是?

  • 新特性提交
  • 日常 bug 修复
  • 站点、文档改进
  • 组件样式改进
  • TypeScript 定义更新
  • 重构
  • 代码风格优化
  • 测试用例
  • 分支合并
  • 其他改动(是关于什么的改动?)

🔗 相关 Issue

重现地址:https://codepen.io/xingleibinghun/pen/dybjgyo

💡 需求背景和解决方案

问题:Table 组件 scroll 属性中配置了 y 字段,并且给其中一列(非最后一列)配置了 width: atuo 导致了列错位。(其实最后一列配置 width: atuo 也会错位,只是ui上察觉不出)
解决方案:通过给 ant-table-header 添加 padding-right: 3px; 解决。

📝 更新日志怎么写?

语言 更新描述
🇺🇸 英文 Add the paddingRight style to solve the Table component's column dislocation problem
🇨🇳 中文 添加 paddingRight 样式来解决 Table 组件列错位的问题
  • 中文(可选):

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

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

解决 scroll 属性存在时列错位的问题
@netlify
Copy link

netlify bot commented Sep 16, 2019

Deploy preview for ant-design ready!

Built with commit ab2fa06

https://deploy-preview-18827--ant-design.netlify.com

@xingleibinghun xingleibinghun changed the title Update ant-table-header style 修改Table组件列错位的问题 Sep 16, 2019
@codecov
Copy link

codecov bot commented Sep 16, 2019

Codecov Report

Merging #18827 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #18827   +/-   ##
=======================================
  Coverage   96.91%   96.91%           
=======================================
  Files         281      281           
  Lines        7546     7546           
  Branches     2102     2105    +3     
=======================================
  Hits         7313     7313           
  Misses        231      231           
  Partials        2        2

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9ea143b...ab2fa06. Read the comment docs.

@xingleibinghun xingleibinghun changed the title 修改Table组件列错位的问题 fix: Table组件列错位的问题 Sep 16, 2019
@yoyo837
Copy link
Contributor

yoyo837 commented Sep 19, 2019

这不是解决问题的根本方案,并且我这里看你其他没问题增加的3px反而有问题

image

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

2 participants