feat: title模块修改

master
JINGYJ 3 weeks ago
parent 0e12f5ce43
commit cedfb63da7

Binary file not shown.

After

Width:  |  Height:  |  Size: 313 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 494 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 192 B

@ -46,9 +46,9 @@
</div> </div>
</div> </div>
<div class="controls"> <div class="controls">
<div class="min"></div> <div class="minus" @click="handleMinimize"></div>
<div class="max"></div> <div class="full" @click="handleMaximize"></div>
<div class="close"></div> <div class="close" @click="handleClose"></div>
</div> </div>
</div> </div>
</div> </div>
@ -76,6 +76,24 @@ const mousedown = (event) => {
dragging.value = false 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> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.titlebar-wrap { .titlebar-wrap {
@ -122,8 +140,38 @@ const mousedown = (event) => {
} }
} }
.controls { .controls {
width: 120px;
display: flex; display: flex;
align-items: center;
justify-content: space-between;
-webkit-app-region: no-drag; -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;
}
} }
} }
} }

Loading…
Cancel
Save