From b1407706a8e298d9b8985fa2115c9114f98c7f3d Mon Sep 17 00:00:00 2001 From: zhuhao <979263092@qq.com> Date: Sun, 22 Dec 2024 12:15:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B0=B8=E5=B7=9D=E4=B8=AA=E6=80=A7=E5=8C=96?= =?UTF-8?q?=E6=89=93=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- src/main/index.js | 7 ++++--- src/renderer/src/components/window-tools/index.vue | 9 +++++++-- src/renderer/src/utils/tool.js | 3 ++- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 5955e9f..9c9774e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aix-win-ws", - "version": "2.5.7", + "version": "2.5.8", "description": "", "main": "./out/main/index.js", "author": "上海交大重庆人工智能研究院", diff --git a/src/main/index.js b/src/main/index.js index 7f7eee1..f43c571 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -7,6 +7,7 @@ import Logger from './logger' // 日志封装 import chat from './chat' // chat封装 import Store from './store' // Store封装 import updateInit from './update' + // 代理 electron/remote // 第一步:引入remote import remote from '@electron/remote/main' @@ -41,7 +42,7 @@ if(!gotTheLock){ } }) } - +let logoIco = import.meta.env.MODE==='yc'||import.meta.env.MODE==='yc2'?'../../resources/yc-logo.png':'../../resources/logo2.ico' //登录窗口 function createLoginWindow() { if (loginWindow) return @@ -53,7 +54,7 @@ function createLoginWindow() { autoHideMenuBar: true, maximizable: false, resizable: false, - icon: join(__dirname, '../../resources/logo2.ico'), + icon: join(__dirname, logoIco), ...(process.platform === 'linux' ? { icon } : {}), webPreferences: { defaultEncoding: 'utf-8', @@ -95,7 +96,7 @@ function createMainWindow() { frame: false, // 无边框 autoHideMenuBar: true, maximizable: false, - icon: join(__dirname, '../../resources/logo2.ico'), + icon: join(__dirname, logoIco), ...(process.platform === 'linux' ? { icon } : {}), webPreferences: { defaultEncoding: 'utf-8', diff --git a/src/renderer/src/components/window-tools/index.vue b/src/renderer/src/components/window-tools/index.vue index 2e40c52..b6b15f4 100644 --- a/src/renderer/src/components/window-tools/index.vue +++ b/src/renderer/src/components/window-tools/index.vue @@ -38,6 +38,7 @@ const closeWindow = () => { ElMessageBox.confirm('确认退出系统吗?', '提示', { confirmButtonText: '确定', cancelButtonText: '取消', + customClass: 'login-close-tool', type: 'warning' }).then(() => { userStore.logOut().then(() => { @@ -54,7 +55,11 @@ onMounted(() =>{ }) - + \ No newline at end of file + diff --git a/src/renderer/src/utils/tool.js b/src/renderer/src/utils/tool.js index 1dbc2be..a83cbd1 100644 --- a/src/renderer/src/utils/tool.js +++ b/src/renderer/src/utils/tool.js @@ -248,10 +248,11 @@ export function toolWindow(type, {url, isConsole, isWeb=true, option={}}) { const devUrl = `${BaseUrl}${url}` const buildUrl = path.join(__dirname, 'index.html') const urlAll = isDev ? devUrl : buildUrl + let logoIco = import.meta.env.MODE==='yc'||import.meta.env.MODE==='yc2'?'/resources/yc-logo.png':'/resources/logo2.ico' return new Promise(async(resolve) => { const config = { width, height, - icon: path.join(appPath, '/resources/logo2.ico'), + icon: path.join(appPath, logoIco), webPreferences: { preload: path.join(API.preloadPath, '/index.js'), sandbox: false,