|
|
|
@ -46,9 +46,9 @@
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="controls">
|
|
|
|
|
<div class="min"></div>
|
|
|
|
|
<div class="max"></div>
|
|
|
|
|
<div class="close"></div>
|
|
|
|
|
<div class="minus" @click="handleMinimize"></div>
|
|
|
|
|
<div class="full" @click="handleMaximize"></div>
|
|
|
|
|
<div class="close" @click="handleClose"></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
@ -76,6 +76,24 @@ const mousedown = (event) => {
|
|
|
|
|
dragging.value = false
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// 最小化
|
|
|
|
|
const handleMinimize = () => {
|
|
|
|
|
electron.ipcRenderer.invoke('renderer-to-main', {
|
|
|
|
|
name: 'min-win'
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
// 最大化
|
|
|
|
|
const handleMaximize = () => {
|
|
|
|
|
electron.ipcRenderer.invoke('renderer-to-main', {
|
|
|
|
|
name: 'max-win'
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
// 关闭
|
|
|
|
|
const handleClose = () => {
|
|
|
|
|
electron.ipcRenderer.invoke('renderer-to-main', {
|
|
|
|
|
name: 'win-close'
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
.titlebar-wrap {
|
|
|
|
@ -122,8 +140,38 @@ const mousedown = (event) => {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.controls {
|
|
|
|
|
width: 120px;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
-webkit-app-region: no-drag;
|
|
|
|
|
.minus {
|
|
|
|
|
width: 24px;
|
|
|
|
|
height: 24px;
|
|
|
|
|
background: url('@/assets/images/titleBar/Minus.png');
|
|
|
|
|
background-size: 100% 100%;
|
|
|
|
|
background-position: center;
|
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
}
|
|
|
|
|
.full {
|
|
|
|
|
width: 24px;
|
|
|
|
|
height: 24px;
|
|
|
|
|
background: url('@/assets/images/titleBar/Full_Screen.png');
|
|
|
|
|
background-size: 100% 100%;
|
|
|
|
|
background-position: center;
|
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
}
|
|
|
|
|
.close {
|
|
|
|
|
width: 24px;
|
|
|
|
|
height: 24px;
|
|
|
|
|
background: url('@/assets/images/titleBar/close.png');
|
|
|
|
|
background-size: 100% 100%;
|
|
|
|
|
background-position: center;
|
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|