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

在最新chrome中,在项目内修改滚动条宽度后,table表头与内容的列宽度不一致

Open whorong opened this issue 1 year ago • 6 comments
trafficstars

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

Version

1.7.7

Environment

chrome: 121.0.6167.184(正式版本),vue2,[email protected]

Reproduction link

http://demo

Steps to reproduce

升级chrome版本至 121.0.6167.184(正式版本) (arm64)

  1. 在项目内全局修改滚动条样式
/* 设置滚动条的样式 */
::-webkit-scrollbar {
width: 6px;
height: 6px;
}
/* 滚动槽 */
::-webkit-scrollbar-track {
border-radius: 10px;
}
/* 滚动条滑块 */
::-webkit-scrollbar-thumb {
border-radius: 10px;
background: rgba(0, 0, 0, 0.1);
}
::-webkit-scrollbar-thumb:window-inactive {
background: rgba(0, 0, 0, 0.1);
}
  1. 使用table组件,使用表头固定,内容上下滚动
<a-Table
:scroll="{ y: 200 }"
>
</a-Table>
  1. 检查表头和列的元素发现 宽度不一致

What is expected?

表头宽度与内容宽度保持一致

What is actually happening?

表头宽度与内容宽度不一致 image

whorong avatar Mar 06 '24 09:03 whorong

遇到相同的问题。。。

xiawenI avatar Mar 07 '24 08:03 xiawenI

遇到相同的问题。。。

在全局修改这个就行了。 .ant-table-hide-scrollbar { scrollbar-color: initial !important; // 谷歌新版浏览器中就是他导致body的美化生效了,header的没生效!淦!!,导致列错位 }

whorong avatar Mar 07 '24 08:03 whorong

成功了!!!🎉🎉🎉 感谢!!!

xiawenI avatar Mar 07 '24 09:03 xiawenI

给每行固定高度也可以,比较方便,比如 /deep/ .ant-table-row{ height: 100px; }

observerzy avatar Mar 12 '24 09:03 observerzy

兄弟姐妹们 解决了吗

1842729347 avatar Apr 02 '24 03:04 1842729347

遇到相同的问题。。。

在全局修改这个就行了。 .ant-table-hide-scrollbar { scrollbar-color: initial !important; // 谷歌新版浏览器中就是他导致body的美化生效了,header的没生效!淦!!,导致列错位 }

解决了,兄弟厉害了。

a4435351 avatar May 13 '24 11:05 a4435351

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 Jul 13 '24 02:07 github-actions[bot]

遇到相同的问题。。。

在全局修改这个就行了。 .ant-table-hide-scrollbar { scrollbar-color: initial !important; // 谷歌新版浏览器中就是他导致body的美化生效了,header的没生效!淦!!,导致列错位 }

我为什么我的加了还是不行~

我都没有这个 节点 ant-table-hide-scrollbar

LukerSpringtree avatar Sep 08 '24 07:09 LukerSpringtree

为什么官方都没解, 这样的bug 就关了呢?

LukerSpringtree avatar Sep 08 '24 09:09 LukerSpringtree