chore(core): 使用path模块替代手动字符串拼接构造路径
This commit is contained in:
@@ -661,7 +661,7 @@ class App extends Component {
|
|||||||
if (goog.isElectron) {
|
if (goog.isElectron) {
|
||||||
Loader.onbeforeunload();
|
Loader.onbeforeunload();
|
||||||
} else {
|
} else {
|
||||||
let href = Env.srcDirPath + '/index.html?' + Url.jsonToUrl({ boardType: BOARD.boardType });
|
let href = path.join(Env.srcDirPath, 'index.html') + '?' + Url.jsonToUrl({ boardType: BOARD.boardType });
|
||||||
window.location.replace(href);
|
window.location.replace(href);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1441,6 +1441,7 @@
|
|||||||
{
|
{
|
||||||
"path": "/electron/loader.js",
|
"path": "/electron/loader.js",
|
||||||
"require": [
|
"require": [
|
||||||
|
"path",
|
||||||
"Mixly.Url",
|
"Mixly.Url",
|
||||||
"Mixly.Config",
|
"Mixly.Config",
|
||||||
"Mixly.Env",
|
"Mixly.Env",
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
goog.loadJs('electron', () => {
|
goog.loadJs('electron', () => {
|
||||||
|
|
||||||
|
goog.require('path');
|
||||||
goog.require('Mixly.Url');
|
goog.require('Mixly.Url');
|
||||||
goog.require('Mixly.Config');
|
goog.require('Mixly.Config');
|
||||||
goog.require('Mixly.Env');
|
goog.require('Mixly.Env');
|
||||||
@@ -32,7 +33,7 @@ Loader.onbeforeunload = function(reload = false) {
|
|||||||
window.location.reload(true);
|
window.location.reload(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let href = Env.srcDirPath + '/index.html?' + Url.jsonToUrl({ boardType: BOARD.boardType ?? 'None' });
|
let href = path.join(Env.srcDirPath, 'index.html') + '?' + Url.jsonToUrl({ boardType: BOARD.boardType ?? 'None' });
|
||||||
let endPromise = [];
|
let endPromise = [];
|
||||||
const { mainStatusBarTabs } = Mixly;
|
const { mainStatusBarTabs } = Mixly;
|
||||||
Serial.getCurrentPortsName().map((name) => {
|
Serial.getCurrentPortsName().map((name) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user