Browse Source

fix(table): table memory overflow

vben 4 years ago
parent
commit
7a07b703d1
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/components/Table/src/hooks/useColumns.ts

+ 2 - 1
src/components/Table/src/hooks/useColumns.ts

@@ -131,7 +131,8 @@ export function useColumns(
   const getViewColumns = computed(() => {
     const viewColumns = sortFixedColumn(unref(getColumnsRef));
 
-    viewColumns.forEach((column) => {
+    const columns = cloneDeep(viewColumns);
+    columns.forEach((column) => {
       const { slots, dataIndex, customRender, format, edit, editRow, flag } = column;
 
       if (!slots || !slots?.title) {