From 6c0bd5125b1e340cfbca34591519732fc4045ae7 Mon Sep 17 00:00:00 2001 From: haiyangcui Date: Wed, 2 Sep 2020 13:16:39 +0200 Subject: [PATCH] =?UTF-8?q?=E7=BE=8E=E5=8C=96=E7=B2=BE=E7=AE=80=E6=A8=A1?= =?UTF-8?q?=E5=BC=8F=E7=9A=84=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mini/Mini.vue | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/src/mini/Mini.vue b/src/mini/Mini.vue index bd36f68..fab6f7d 100644 --- a/src/mini/Mini.vue +++ b/src/mini/Mini.vue @@ -23,13 +23,16 @@
- + - + + + + - +
@@ -80,10 +83,12 @@ export default { }, methods: { frameClickEvent (e) { + const win = remote.getCurrentWindow() if (e === 'min') { - const win = remote.getCurrentWindow() win.minimize() - return false + } + if (e === 'max') { + win.isMaximized() ? win.unmaximize() : win.maximize() } if (e === 'close') { ipcRenderer.send('win') @@ -91,7 +96,6 @@ export default { } if (e === 'top') { this.isAlwaysOnTop = !this.isAlwaysOnTop - const win = remote.getCurrentWindow() win.setAlwaysOnTop(this.isAlwaysOnTop) } }, @@ -459,15 +463,18 @@ html,body{ span{ -webkit-app-region: no-drag; display: inline-block; - width: 16px; - height: 16px; + width: 14px; + height: 14px; text-align: center; - line-height: 16px; + line-height: 14px; border-radius: 50%; margin-right: 10px; cursor: pointer; opacity: 0.4; &.min{ + background-color: #32dc36; + } + &.max{ background-color: #ffbe2a; } &.close{