diff --git a/packages/core/src/config/index.js b/packages/core/src/config/index.js index 011f18a3c..3805441d5 100644 --- a/packages/core/src/config/index.js +++ b/packages/core/src/config/index.js @@ -27,6 +27,7 @@ module.exports = { personalUrl: '' }, startShowWindow: true, // 启动时是否打开窗口:true=打开窗口, false=隐藏窗口 + windowSize: { width: 900, height: 750 }, // 启动时,窗口的尺寸 theme: 'dark', // 主题:light=亮色, dark=暗色 autoChecked: true, // 是否自动检查更新 skipPreRelease: true, // 是否忽略预发布版本 diff --git a/packages/gui/src/background.js b/packages/gui/src/background.js index 88ee458c2..6a09f0813 100644 --- a/packages/gui/src/background.js +++ b/packages/gui/src/background.js @@ -136,10 +136,10 @@ function changeAppConfig (config) { function createWindow (startHideWindow) { // Create the browser window. - + const windowSize = DevSidecar.api.config.get().app.windowSize || {} win = new BrowserWindow({ - width: 900, - height: 750, + width: windowSize.width || 900, + height: windowSize.height || 750, title: 'DevSidecar', webPreferences: { enableRemoteModule: true, diff --git a/packages/gui/src/view/pages/setting.vue b/packages/gui/src/view/pages/setting.vue index 33cba2876..f42511586 100644 --- a/packages/gui/src/view/pages/setting.vue +++ b/packages/gui/src/view/pages/setting.vue @@ -101,6 +101,10 @@ 启动软件时,是否打开窗口。提示:如果设置为隐藏窗口,可点击系统托盘小图标打开窗口。 + +  * + +