feat: 调整
This commit is contained in:
@@ -236,7 +236,7 @@ const createWindow = () => {
|
||||
contextIsolation: true,
|
||||
nodeIntegration: false,
|
||||
},
|
||||
frame: false,
|
||||
frame: true,
|
||||
show: false,
|
||||
});
|
||||
|
||||
|
||||
@@ -1,42 +1,5 @@
|
||||
<template>
|
||||
<div class="flex flex-col h-screen w-screen overflow-hidden">
|
||||
<!-- 自定义标题栏 -->
|
||||
<nav class="flex items-center justify-between h-8 bg-white border-b border-gray-100 shrink-0 select-none z-50">
|
||||
<!-- 左侧:缩放菜单按钮 -->
|
||||
<div class="flex items-center px-4 no-drag">
|
||||
<el-button link size="small" class="p-1! hover:bg-gray-100 rounded" @click="appStore.toggleSidebar">
|
||||
<LucideIcon v-show="appStore.collapsed" name="panel-left-dashed" size="16" color="#000"></LucideIcon>
|
||||
<LucideIcon v-show="!appStore.collapsed" name="panel-right-dashed" size="16" color="#000"></LucideIcon>
|
||||
</el-button>
|
||||
<span class="ml-4 text-sm font-medium pointer-events-none">{{ appStore.title }}</span>
|
||||
</div>
|
||||
|
||||
<!-- 中间:拖拽区域 -->
|
||||
<div class="flex-1 h-full"></div>
|
||||
|
||||
<!-- 右侧:窗口控制按钮 -->
|
||||
<div class="flex items-center h-full no-drag">
|
||||
<button
|
||||
class="flex items-center justify-center w-10 h-full hover:bg-gray-100 transition-colors"
|
||||
@click="handleMinimize"
|
||||
>
|
||||
<el-icon :size="14"><SemiSelect /></el-icon>
|
||||
</button>
|
||||
<button
|
||||
class="flex items-center justify-center w-10 h-full hover:bg-gray-100 transition-colors"
|
||||
@click="handleMaximize"
|
||||
>
|
||||
<el-icon :size="12"><CopyDocument /></el-icon>
|
||||
</button>
|
||||
<button
|
||||
class="flex items-center justify-center w-10 h-full hover:bg-red-500 hover:text-white transition-colors"
|
||||
@click="handleClose"
|
||||
>
|
||||
<el-icon :size="14"><Close /></el-icon>
|
||||
</button>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="flex flex-1 overflow-hidden">
|
||||
<!-- 侧边栏 -->
|
||||
<aside
|
||||
@@ -121,18 +84,7 @@
|
||||
import { computed, ref } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { useAppStore } from '@/stores/app';
|
||||
import {
|
||||
House,
|
||||
Monitor,
|
||||
Expand,
|
||||
Fold,
|
||||
Edit,
|
||||
ChatDotRound,
|
||||
Search,
|
||||
SemiSelect,
|
||||
CopyDocument,
|
||||
Close,
|
||||
} from '@element-plus/icons-vue';
|
||||
import { House, Monitor, Expand, Fold, Edit, ChatDotRound, Search } from '@element-plus/icons-vue';
|
||||
import LucideIcon from '../components/base/LucideIcon.vue';
|
||||
|
||||
const route = useRoute();
|
||||
@@ -141,16 +93,4 @@ const appStore = useAppStore();
|
||||
const showAppInfo = ref(false);
|
||||
|
||||
const currentTitle = computed(() => route.meta?.title || appStore.title);
|
||||
|
||||
const handleMinimize = () => {
|
||||
window.electronAPI.send('window:minimize');
|
||||
};
|
||||
|
||||
const handleMaximize = () => {
|
||||
window.electronAPI.send('window:maximize');
|
||||
};
|
||||
|
||||
const handleClose = () => {
|
||||
window.electronAPI.send('window:close');
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -14,4 +14,10 @@ export default defineConfig({
|
||||
'@': resolve(__dirname, 'src/renderer'),
|
||||
},
|
||||
},
|
||||
server: {
|
||||
watch: {
|
||||
usePolling: true,
|
||||
interval: 1000,
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user