mirror of
https://github.com/vbenjs/gf-vben-admin.git
synced 2025-01-23 11:50:20 +08:00
修复 init 运行时机不正确 (#1452)
修复去掉checkList 后,移动配置中的table顺序后,调用tabel.setColum() 时触发 init() ,导致checkList 被重置bug
This commit is contained in:
parent
ab62739fd1
commit
23b5538eae
@ -124,6 +124,7 @@
|
||||
|
||||
interface State {
|
||||
checkAll: boolean;
|
||||
isInit: boolean;
|
||||
checkedList: string[];
|
||||
defaultCheckList: string[];
|
||||
}
|
||||
@ -180,7 +181,7 @@
|
||||
|
||||
watchEffect(() => {
|
||||
const columns = table.getColumns();
|
||||
if (columns.length) {
|
||||
if (columns.length && !state.isInit) {
|
||||
init();
|
||||
}
|
||||
});
|
||||
@ -233,6 +234,7 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
state.isInit = true;
|
||||
state.checkedList = checkList;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user