Explorar o código

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

jiaxing.liao hai 1 semana
pai
achega
0b3427e477
Modificáronse 1 ficheiros con 1 adicións e 5 borrados
  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