Commit 7a07b703d11afb832daa4bd2b87bf5cab3c61e04
1 parent
17ecaea9
fix(table): table memory overflow
Showing
1 changed file
with
2 additions
and
1 deletions
src/components/Table/src/hooks/useColumns.ts
@@ -131,7 +131,8 @@ export function useColumns( | @@ -131,7 +131,8 @@ export function useColumns( | ||
131 | const getViewColumns = computed(() => { | 131 | const getViewColumns = computed(() => { |
132 | const viewColumns = sortFixedColumn(unref(getColumnsRef)); | 132 | const viewColumns = sortFixedColumn(unref(getColumnsRef)); |
133 | 133 | ||
134 | - viewColumns.forEach((column) => { | 134 | + const columns = cloneDeep(viewColumns); |
135 | + columns.forEach((column) => { | ||
135 | const { slots, dataIndex, customRender, format, edit, editRow, flag } = column; | 136 | const { slots, dataIndex, customRender, format, edit, editRow, flag } = column; |
136 | 137 | ||
137 | if (!slots || !slots?.title) { | 138 | if (!slots || !slots?.title) { |