<template>
<div class="tool">
	<el-icon-minus class="btn" @click="minimizeWin" :size="10">最小化</el-icon-minus>
	<el-icon-full-screen class="btn" @click="maximizeWin" :size="8">最大化</el-icon-full-screen>
	<el-icon-close class="btn" @click="closeWin" :size="10">关闭窗口</el-icon-close>
</div>
</template>

<script>
import { ipcRenderer } from "electron"

export default {
	name: 'HelloWorld',
	props: {
		msg: String
	},
	created(){

	},
	methods: {
		closeWin(){
			ipcRenderer.send('controller.system.closeWin')
		},
		minimizeWin(){
			ipcRenderer.send('controller.system.minimizeWin')
		},
		maximizeWin(){
			ipcRenderer.send('controller.system.maximizeWin')
		}
	}
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
.tool{display: flex; flex-direction: row; align-items: center; justify-content: end; gap: 8px; -webkit-app-region: no-drag; padding-right: 10px;}
.tool .btn{-webkit-app-region: no-drag; width: 14px; height: 14px;}
</style>
