|
|
@@ -1,10 +1,19 @@
|
|
|
<template>
|
|
|
- <n-layout>
|
|
|
- <n-layout-header data-tauri-drag-region>
|
|
|
- <div class="head">
|
|
|
+ <n-layout class="layout">
|
|
|
+ <n-layout-header>
|
|
|
+ <div
|
|
|
+ class="layout-head"
|
|
|
+ data-tauri-drag-region
|
|
|
+ >
|
|
|
<Icon
|
|
|
- name="icon"
|
|
|
+ name="mini"
|
|
|
size="20"
|
|
|
+ @click="appWindow.minimize()"
|
|
|
+ />
|
|
|
+ <Icon
|
|
|
+ name="close"
|
|
|
+ size="16"
|
|
|
+ @click="appWindow.close()"
|
|
|
/>
|
|
|
</div>
|
|
|
</n-layout-header>
|
|
|
@@ -33,9 +42,11 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup lang='ts'>
|
|
|
+import { Window } from '@tauri-apps/api/window'
|
|
|
import { h, ref } from 'vue'
|
|
|
import Icon from './icon.vue'
|
|
|
|
|
|
+const appWindow = new Window('main')
|
|
|
const selectedKey = ref('')
|
|
|
const menuOptions = ref([
|
|
|
{
|
|
|
@@ -49,4 +60,24 @@ const menuOptions = ref([
|
|
|
}
|
|
|
])
|
|
|
</script>
|
|
|
-<style lang="scss" scoped></style>
|
|
|
+<style lang="scss" scoped>
|
|
|
+.layout {
|
|
|
+ overflow: hidden;
|
|
|
+ border-radius: 8px;
|
|
|
+
|
|
|
+ &-head {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: flex-end;
|
|
|
+ padding: 3px 10px;
|
|
|
+ cursor: move;
|
|
|
+
|
|
|
+ &>svg {
|
|
|
+ cursor: pointer;
|
|
|
+ &:hover{
|
|
|
+ color: red;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|