mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-01-24 10:33:50 +08:00
fix(useColumn): fixed table column changes with hidden columns disappearing after dropping (#453)
Co-authored-by: Alan <alan@ichestnuts.com>
This commit is contained in:
parent
8b5cbca35a
commit
f05cc6d34e
@ -207,6 +207,11 @@ export function useColumns(
|
||||
...item,
|
||||
defaultHidden: false,
|
||||
});
|
||||
} else {
|
||||
newColumns.push({
|
||||
...item,
|
||||
defaultHidden: true,
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
@ -214,8 +219,8 @@ export function useColumns(
|
||||
if (!isEqual(cacheKeys, columns)) {
|
||||
newColumns.sort((prev, next) => {
|
||||
return (
|
||||
columnKeys.indexOf(prev.dataIndex as string) -
|
||||
columnKeys.indexOf(next.dataIndex as string)
|
||||
cacheKeys.indexOf(prev.dataIndex as string) -
|
||||
cacheKeys.indexOf(next.dataIndex as string)
|
||||
);
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user