-
如上图,表格设置了固定列,但是固定列的border在初始位置上有的,一旦横向滚动后,border就会随滚动条滚动。但是在sandbox里一样的数据结构,又是正常的。有什么因素会导致出现这种问题 |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
沙盒里显示是正常的,https://codesandbox.io/p/devbox/tdesign-table-test-vkt4ww |
Beta Was this translation helpful? Give feedback.
-
查看issue,感觉可能跟#5260 (comment) |
Beta Was this translation helpful? Give feedback.
-
zoom和border-collapse设置都试过了,没什么效果。最后采用了outline的解决方法,这个方法也有弊端,表格固定头和下面表格会有1px的错位 .t-table__header--fixed > tr > th {
outline: 1px solid var(--td-component-border);
border-left: none;
border-bottom: none;
}
.t-table__cell--fixed-left,
.t-table__cell--fixed-right {
outline: 1px solid var(--td-component-border);
border-left: none;
border-bottom: none;
} 或者表格的单元格都用outline,取消border,这样就没有1px错位 .t-table th,
.t-table td {
outline: 1px solid var(--td-component-border);
border-left: none;
border-bottom: none;
} 提问我就不删除了,留一个方案参考吧 |
Beta Was this translation helpful? Give feedback.
zoom和border-collapse设置都试过了,没什么效果。最后采用了outline的解决方法,这个方法也有弊端,表格固定头和下面表格会有1px的错位
或者表格的单元格都用outline,取消border,这样就没有1px错位
提问我就不删除了,留一个方案参考吧