ant-design-vue icon indicating copy to clipboard operation
ant-design-vue copied to clipboard

table组件滚动条和选择框同时存在时,表头和内容有错位严重

Open Gilbert5210 opened this issue 1 year ago • 5 comments
trafficstars

  • [ ] I have searched the issues of this repository and believe that this is not a duplicate.

Version

3.2.20

Environment

chrome 版本 113.0.5672.126(正式版本) (x86_64), [email protected]

Reproduction link

https://vuecomponent.github.io/issue-helper/

Steps to reproduce

  1. 因为在window上,没有滚动条的也出现了滚动条的占位
  2. 所以我们在项目中,设置了这个属性,固定最后一列到最右边
.ant-table-body {
overflow-y: auto!important;
}
  1. 这个时候发现这里有一个错位 image image

What is expected?

不存在错位,可以取消表头的这个td的显示

What is actually happening?

表头和内容存在错位


Gilbert5210 avatar Dec 12 '23 06:12 Gilbert5210

@cc-hearts 帮忙看看 ?

Gilbert5210 avatar Dec 15 '23 07:12 Gilbert5210

能提供可以复现的代码吗?

cc-hearts avatar Dec 15 '23 07:12 cc-hearts

能提供可以复现的代码吗?

https://codesandbox.io/p/sandbox/gu-ding-tou-he-lie-ant-design-vue-3-2-20-forked-hxtq7r 这里看看

Gilbert5210 avatar Dec 15 '23 08:12 Gilbert5210

如果设置了

.ant-table-body {
overflow-y: auto!important;
}

或许需要自己去判断 table的高度从而动态设置 scroll.y属性了🤔。

cc-hearts avatar Dec 17 '23 11:12 cc-hearts

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days

github-actions[bot] avatar Feb 16 '24 02:02 github-actions[bot]