Ver código fonte

fix: 修复加载本地项目问题

jiaxing.liao 1 semana atrás
pai
commit
0b3427e477
1 arquivos alterados com 1 adições e 5 exclusões
  1. 1 5
      src/renderer/src/store/modules/project.ts

+ 1 - 5
src/renderer/src/store/modules/project.ts

@@ -283,11 +283,7 @@ export const useProjectStore = defineStore('project', () => {
       const globalStylePath = path.replace('project.ui', 'style.ui')
       const style = await window.electron.ipcRenderer.invoke('read-file', globalStylePath, 'utf-8')
       if (result) {
-        loadProject(
-          JSON.parse(result),
-          path.slice(0, path.lastIndexOf('\\') + 1),
-          JSON.parse(style)
-        )
+        loadProject(JSON.parse(result), path.slice(0, path.lastIndexOf('\\')), JSON.parse(style))
         ElMessage.success({
           message: t('openProjectSuccess'),
           plain: true