소스 검색

fix: 新增导入数据脏数据的过滤

奔跑的面条 3 년 전
부모
커밋
100ec84d57
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      src/views/chart/ContentEdit/components/EditTools/hooks/useFile.hooks.ts

+ 2 - 2
src/views/chart/ContentEdit/components/EditTools/hooks/useFile.hooks.ts

@@ -46,7 +46,8 @@ const updateComponent = async (fileData: any, isSplace = false) => {
         )
       }
     } else {
-      // 非组件
+      // 非组件(顺便排除脏数据)
+      if(key !== 'editCanvasConfig' && key !== 'requestGlobalConfig') return
       Object.assign((chartEditStore as any)[key], fileData[key])
     }
   }
@@ -54,7 +55,6 @@ const updateComponent = async (fileData: any, isSplace = false) => {
 
 export const useFile = () => {
   const importUploadFileListRef = ref()
-  const chartEditStore = useChartEditStore()
 
   // 上传-前置
   //@ts-ignore