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