【issues/825】tabel的列设置隐藏列保存后切换路由问题[重置没勾选]

pull/859/head
zhangdaiscott 2023-11-04 17:39:10 +08:00
parent df17b4b6f1
commit bffd067985
1 changed files with 9 additions and 1 deletions

View File

@ -289,7 +289,15 @@
// reset columns
function reset() {
state.checkedList = [...state.defaultCheckList];
// state.checkedList = [...state.defaultCheckList];
// update-begin--author:liaozhiyang---date:20231103---forissues/825tabel[]
state.checkedList = table
.getColumns({ ignoreAction: true })
.map((item) => {
return item.dataIndex || item.title;
})
.filter(Boolean) as string[];
// update-end--author:liaozhiyang---date:20231103---forissues/825tabel[]
state.checkAll = true;
plainOptions.value = unref(cachePlainOptions);
plainSortOptions.value = unref(cachePlainOptions);