Quellcode durchsuchen

style: 修改注释写反的问题

奔跑的面条 vor 3 Jahren
Ursprung
Commit
46f93ffb86

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

@@ -32,15 +32,15 @@ export const useFile = () => {
             negativeText: '覆盖(不可撤回)',
             negativeButtonProps: { type: 'info', ghost: false },
             // 新增
-            onNegativeCallback: async () => {
+            onPositiveCallback: async () => {
               fileData = JSON.parse(fileData)
-              await updateComponent(fileData, true)
+              await updateComponent(fileData)
               window['$message'].success('导入成功!')
             },
             // 覆盖
-            onPositiveCallback: async () => {
+            onNegativeCallback: async () => {
               fileData = JSON.parse(fileData)
-              await updateComponent(fileData)
+              await updateComponent(fileData, true)
               window['$message'].success('导入成功!')
             }
           })