소스 검색

fix(table): table memory overflow

vben 4 년 전
부모
커밋
7a07b703d1
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  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) {