[update] 解决columns每一个都写dataIndex会有一个横向滚动条的问题

This commit is contained in:
lideqin
2023-09-21 14:56:48 +08:00
parent 4beca1ec6f
commit 02a9f8e792
6 changed files with 16 additions and 44 deletions
+2 -1
View File
@@ -446,7 +446,8 @@ export default {
col = columns.find(col => getKey(col) === key) || {}
}
// 没有开启拖拽 或 没有宽度 或 有定位,都不能拖拽(防止布局异常,至少有一列不设width并且不能有fixed)
if (!col.width || !!col.fixed) {
// 或者是最后一列也不能拖拽
if (!col.width || !!col.fixed || col.title === columns[columns.length - 1].title) {
return <th {...restProps}>{children}</th>
}
// 开始拖拽监听