-
Notifications
You must be signed in to change notification settings - Fork 393
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Bug 描述
GiTable拖拽时,Fixed在左右的列也会变化位置,而且是悬浮的,形成了遮挡
复现步骤
- 列的属性设置为fixed:'left'
- 点击列表左上的设置
- 拖动带有固定属性的列
- 看到该列位置改变,且悬浮,拉进度条时会形成遮挡
预期结果
正确预期应为不允许拖拽固定在左右两侧的列,因为这种列往往是用户必看的核心信息
环境信息
ContiNew Admin version(s):3.0.1额外补充
我已对该问题进行了修改:
修改\src\components\GiTable.vue的_columns方法
修改后如下:
// 排序和过滤可显示的列数据
const _columns = computed(() => {
if (!attrs.columns) return []
const arr = attrs.columns as TableColumnData[]
// 显示的dataIndex
const showDataIndexs = settingColumnList.value
.filter((i) => i.show)
.map((i) => i.key || (typeof i.title === 'string' ? i.title : ''))
// 显示的columns数据
const filterColumns = arr.filter((i) =>
showDataIndexs.includes(i.dataIndex || (typeof i.title === 'string' ? i.title : ''))
)
const sortedColumns: TableColumnData[] = []
filterColumns.forEach((j) => {
if (j.fixed === 'left') {
sortedColumns.push(j)
}
})
settingColumnList.value.forEach((i) => {
filterColumns.forEach((j) => {
if (i.key === (j.dataIndex || j.title) && j.fixed === undefined) {
sortedColumns.push(j)
}
})
})
filterColumns.forEach((j) => {
if (j.fixed === 'right') {
sortedColumns.push(j)
}
})
return sortedColumns
})确认
- 阅读文档
- 根据报错信息百度或 Google 一下
- 搜索是否有其他人提交过类似的 issue,如果对应 issue 尚未解决,您可以先订阅关注该 issue(为了方便后来者查找问题解决方法,请尽量避免创建重复的 issue)
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working