From 6d3eb288879be9b85afb5510dfc2af12a0e3fb85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E7=AB=8B=E5=B8=AE?= <3294713004@qq.com> Date: Tue, 15 Oct 2024 18:14:48 +0800 Subject: [PATCH] =?UTF-8?q?Fix:=20=E4=BF=AE=E5=A4=8D=E7=A6=BB=E7=BA=BF?= =?UTF-8?q?=E7=89=88=E4=B8=8B=E6=9C=AC=E5=9C=B0=E5=AF=BC=E5=85=A5=E7=AC=AC?= =?UTF-8?q?=E4=B8=89=E6=96=B9=E5=BA=93=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mixly-modules/electron/lib-manager.js | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/common/modules/mixly-modules/electron/lib-manager.js b/common/modules/mixly-modules/electron/lib-manager.js index 53ef87d0..5b910d90 100644 --- a/common/modules/mixly-modules/electron/lib-manager.js +++ b/common/modules/mixly-modules/electron/lib-manager.js @@ -151,16 +151,16 @@ LibManager.loadLibsAndUpdateJsCssList = (doFunc = () => {}) => { Env.thirdPartyXML = xml; let loadPromise = []; if (js.length) { - loadPromise.push(new Promise((resove, reject) => { + loadPromise.push(new Promise((resolve, reject) => { LazyLoad.js(js, function () { - resove(); + resolve(); }); })); } if (css.length) { - loadPromise.push(new Promise((resove, reject) => { + loadPromise.push(new Promise((resolve, reject) => { LazyLoad.css(css, function () { - resove(); + resolve(); }); })); } @@ -758,9 +758,9 @@ LibManager.importFromLocalWithZip = (type, filePath, endFunc) => { LibManager.delLibs = (type, libPathList, layerNum) => { let delPromiseList = []; for (let libPath of libPathList) { - delPromiseList.push(new Promise((resove, reject) => { + delPromiseList.push(new Promise((resolve, reject) => { fs_extra.remove(libPath, (error) => { - resove(error); + resolve(error); }); })); } @@ -819,7 +819,7 @@ LibManager.unZip = (inPath, desPath, delZip, endFunc = (errorMessage) => {}) => } LibManager.copyDir = (startPath, endPath) => { - return new Promise((resove, reject) => { + return new Promise((resolve, reject) => { fs_extra.ensureDir(endPath) .then(() => { return fs_extra.emptyDir(endPath); @@ -828,7 +828,7 @@ LibManager.copyDir = (startPath, endPath) => { return fs_extra.copy(startPath, endPath); }) .then(() => { - resove({ error: null, endPath }); + resolve({ error: null, endPath }); }) .catch((error) => { resolve({ error, endPath }); @@ -837,14 +837,14 @@ LibManager.copyDir = (startPath, endPath) => { } LibManager.copyFile = (startPath, endPath) => { - return new Promise((resove, reject) => { + return new Promise((resolve, reject) => { const endDirPath = path.dirname(endPath); fs_extra.ensureDir(endDirPath) .then(() => { return fs_extra.copy(startPath, endPath); }) .then(() => { - resove({ error: null, endPath }); + resolve({ error: null, endPath }); }) .catch((error) => { resolve({ error, endPath });