From 5c0cc9a91ce40d4eb5e04862089bc4b1e2f446bf Mon Sep 17 00:00:00 2001 From: zhuhao <979263092@qq.com> Date: Fri, 27 Sep 2024 10:12:49 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=88=E6=9C=AC=E6=8F=90=E5=8D=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- src/main/index.js | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 0fc3692..89cc4f2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aix-win", - "version": "2.1.1", + "version": "2.1.3", "description": "", "main": "./out/main/index.js", "author": "example.com", diff --git a/src/main/index.js b/src/main/index.js index f6803fe..f6726b2 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -135,7 +135,7 @@ function createMainWindow() { } else { mainWindow.loadFile(join(__dirname, '../renderer/index.html')) } - + // mainWindow.setAlwaysOnTop(true, "screen-saver") // 将窗口设置为顶层窗口 // mainWindow.setVisibleOnAllWorkspaces(true) // 如果窗口在所有工作区都可见 // 第三步: 开启remote服务 @@ -280,14 +280,10 @@ function handleAll() { }) // 用于监听-状态管理变化-同步所有窗口 ipcMain.handle('pinia-state-change', (e, storeName, jsonStr) => { - console.log('pinia-state-change-1', storeName, jsonStr) for(const curWin of BrowserWindow.getAllWindows()){ const id = curWin.webContents.id const bool = id !== e.sender.id && !curWin.isDestroyed() - if (id === e.sender.id) { - console.log('pinia-state-change-2', 'windows-send', curWin.type) - } if (bool) { // 除了消息发送窗口和销毁的窗口 其他都发送 curWin.webContents.send('pinia-state-set', storeName, jsonStr) }