fix(components/Titlebar): 还原/最大化按钮在双击标题栏时不会更新的问题 (#1575)

* fix(components/Titlebar): `还原/最大化`按钮在双击标题栏时不会更新的问题

* update
This commit is contained in:
memorydream 2022-04-29 19:52:22 +08:00 committed by GitHub
parent c85af59b21
commit a9b05d66a6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 15 deletions

View file

@ -12,8 +12,8 @@
<div
class="button max-restore codicon"
:class="{
'codicon-chrome-restore': !isShowMaximized,
'codicon-chrome-maximize': isShowMaximized,
'codicon-chrome-restore': isMaximized,
'codicon-chrome-maximize': !isMaximized,
}"
@click="windowMaxRestore"
></div>
@ -40,7 +40,7 @@ export default {
name: 'LinuxTitlebar',
data() {
return {
isShowMaximized: true,
isMaximized: false,
};
},
computed: {
@ -49,9 +49,7 @@ export default {
created() {
if (process.env.IS_ELECTRON === true) {
ipcRenderer.on('isMaximized', (_, value) => {
// valuefalse
// valuetrue
this.isShowMaximized = value;
this.isMaximized = value;
});
}
},