From c2a2b7cb4b470bf113181a90a115a304cb8af243 Mon Sep 17 00:00:00 2001
From: Java-S12138 <1007643852@qq.com>
Date: Wed, 17 Aug 2022 22:53:17 +0800
Subject: [PATCH] add backhome button (queryMatchWindow)
---
frankElectron/queryMatch.js | 28 ++++++++++++---
.../components/queryMatch/dashboard.vue | 35 +++++++++++++++----
2 files changed, 52 insertions(+), 11 deletions(-)
diff --git a/frankElectron/queryMatch.js b/frankElectron/queryMatch.js
index 8d37de5..1d4f7f4 100644
--- a/frankElectron/queryMatch.js
+++ b/frankElectron/queryMatch.js
@@ -51,10 +51,28 @@ export const queryMatchIpc = async (mainWindow,userHeader) => {
})
// 关闭游戏历史窗口
ipcMain.on('query-match-close', () => {
- for (const currentWindow of BrowserWindow.getAllWindows()) {
- if (currentWindow.title === 'QueryMatch'){
- currentWindow.close()
- }
- }
+ closeWin(false)
+ })
+// 关闭查询游戏窗口, 回到主页
+ ipcMain.on('query-match-back-home',() => {
+ closeWin(true)
})
}
+
+const closeWin = (showMain) => {
+ let queryMatchWin
+ let mainWin
+ for (const currentWindow of BrowserWindow.getAllWindows()) {
+ if (currentWindow.title === 'QueryMatch'){
+ queryMatchWin = currentWindow
+ }else if (currentWindow.title === 'Frank'){
+ mainWin = currentWindow
+ }
+ }
+ if (showMain){
+ queryMatchWin.close()
+ mainWin.show()
+ }else {
+ queryMatchWin.close()
+ }
+}
diff --git a/src/render/components/queryMatch/dashboard.vue b/src/render/components/queryMatch/dashboard.vue
index fbaccbe..7d0f32e 100644
--- a/src/render/components/queryMatch/dashboard.vue
+++ b/src/render/components/queryMatch/dashboard.vue
@@ -1,6 +1,6 @@
-
-
+
+
@@ -17,6 +17,18 @@
最小化
+
+
+
+
+
+
+
+
+ 是否回到软件主页
+
+
@@ -30,21 +42,23 @@
-
-
+
+
搜索
+
+
@@ -114,11 +134,14 @@ header {
.rightCorner {
padding-top: 8px;
- margin-left: 45px;
+ margin-left: 8px;
}
.frankTitle {
align-items: center
}
+.rightSpace {
+ margin-top: -8px;align-items: center
+}