From eb78a801313ea1120ee2dd790c1c7335259e2862 Mon Sep 17 00:00:00 2001 From: lyc Date: Wed, 25 Sep 2024 16:12:55 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E5=8F=B0-edit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/index.js | 11 +- src/renderer/src/layout/components/Header.vue | 2 - .../views/desktop/container/work-trend.vue | 23 +--- src/renderer/src/views/desktop/index.vue | 102 +++++++++++------- 4 files changed, 77 insertions(+), 61 deletions(-) diff --git a/src/main/index.js b/src/main/index.js index 0b84cd4..f6803fe 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -88,9 +88,10 @@ function createLoginWindow() { //主窗口 function createMainWindow() { mainWindow = new BrowserWindow({ - width: 1200, - minWidth: 1350, + width: 1350, + minWidth: 1200, height: 700, + minHeight: 700, show: false, frame: false, // 无边框 autoHideMenuBar: true, @@ -118,6 +119,11 @@ function createMainWindow() { }, 1000) // app.quit() // 主窗口关闭-结束所有进程 }) + mainWindow.on('resize', () => { + const { width, height } = mainWindow.getBounds(); + mainWindow.webContents.send('minWinResize', { width, height }); + }); + mainWindow.webContents.setWindowOpenHandler((details) => { shell.openExternal(details.url) return { action: 'deny' } @@ -129,6 +135,7 @@ function createMainWindow() { } else { mainWindow.loadFile(join(__dirname, '../renderer/index.html')) } + // mainWindow.setAlwaysOnTop(true, "screen-saver") // 将窗口设置为顶层窗口 // mainWindow.setVisibleOnAllWorkspaces(true) // 如果窗口在所有工作区都可见 // 第三步: 开启remote服务 diff --git a/src/renderer/src/layout/components/Header.vue b/src/renderer/src/layout/components/Header.vue index de4788c..31d79ea 100644 --- a/src/renderer/src/layout/components/Header.vue +++ b/src/renderer/src/layout/components/Header.vue @@ -70,10 +70,8 @@ import { ArrowDown } from '@element-plus/icons-vue' import WindowTools from '@/components/window-tools/index.vue' import useUserStore from '@/store/modules/user' import { updateUserInfo } from '@/api/system/user' -import outLink from '@/utils/linkConfig' import logoIco from '@/assets/images/logo.png' import { listEvaluation } from '@/api/classManage/index' -import { clearBookInfo } from '@/utils/ruoyi' import { sessionStore } from '@/utils/store' import { useToolState } from '@/store/modules/tool' diff --git a/src/renderer/src/views/desktop/container/work-trend.vue b/src/renderer/src/views/desktop/container/work-trend.vue index 2a0e70a..0f4a4ad 100644 --- a/src/renderer/src/views/desktop/container/work-trend.vue +++ b/src/renderer/src/views/desktop/container/work-trend.vue @@ -34,30 +34,15 @@ \ No newline at end of file -- 2.44.0.windows.1