This commit is contained in:
zhongluofeng
2026-07-23 16:03:38 +08:00
parent 95a69b0017
commit 62db8e1982
5 changed files with 374 additions and 227 deletions
-2
View File
@@ -36,7 +36,6 @@ const displayModules = computed(() => {
'bg-primary text-primary-foreground shadow-md': activeModule === module.id,
'hover:bg-secondary/50': activeModule !== module.id
}"
:title="module.name"
@click="emit('change', module.id)"
>
<component :is="getModuleIcon(module.icon)" class="h-5 w-5" />
@@ -61,7 +60,6 @@ const displayModules = computed(() => {
'bg-primary text-primary-foreground shadow-md': activeModule === 'settings',
'hover:bg-secondary/50': activeModule !== 'settings'
}"
title="常规设置"
@click="emit('change', 'settings')"
>
<Settings class="h-5 w-5" />
+18 -10
View File
@@ -1,6 +1,6 @@
<script setup lang="ts">
import { ref, computed, onMounted, onUnmounted } from 'vue'
import { Search, Minus, X, Settings, ChevronRight } from '@lucide/vue'
import { Search, Settings, ChevronRight } from '@lucide/vue'
import { Input } from '@/components/ui/input'
import { getCurrentWindow } from '@tauri-apps/api/window'
import { useSearchStore, type SearchItem } from '@/stores/searchStore'
@@ -263,7 +263,10 @@ const handleBlur = () => {
@click="minimize"
@mousedown.stop
>
<Minus class="h-4 w-4" />
<!-- 最小化水平线1:1 渲染 + 0.5 像素偏移确保锐利 -->
<svg class="w-[10px] h-[10px]" viewBox="0 0 10 10" fill="none" stroke="currentColor" stroke-width="1" shape-rendering="geometricPrecision">
<path d="M0 5.5 H10" />
</svg>
</button>
<button
id="titlebar-maximize"
@@ -271,14 +274,16 @@ const handleBlur = () => {
@click="maximize"
@mousedown.stop
>
<!-- 最大化圆角矩形 -->
<svg v-if="!isMaximized" class="h-3 w-3" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<rect x="4" y="4" width="16" height="16" rx="2" />
<!-- 最大化正方形Windows 11 原生样式 -->
<svg v-if="!isMaximized" class="w-[10px] h-[10px]" viewBox="0 0 10 10" fill="none" stroke="currentColor" stroke-width="1" shape-rendering="geometricPrecision">
<rect x="0.5" y="0.5" width="9" height="9" />
</svg>
<!-- 还原单圆角矩形 + 右上角圆角 L形顶边+右边圆角连接 -->
<svg v-else class="h-3 w-3" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<rect x="4" y="4" width="16" height="16" rx="2" />
<path d="M14 4H20V10" />
<!-- 还原两个重叠正方形前正方形在左下后正方形在右上Windows 11 原生样式 -->
<svg v-else class="w-[10px] h-[10px]" viewBox="0 0 10 10" fill="none" stroke="currentColor" stroke-width="1" shape-rendering="geometricPrecision">
<!-- 后正方形右上只勾勒未被前正方形遮挡的可见轮廓 (2.5,2.5) (7.5,7.5) 交汇点停止 -->
<path d="M2.5 0.5 H9.5 V7.5 H7.5 V2.5 H2.5 Z" />
<!-- 前正方形左下完整绘制 -->
<path d="M0.5 2.5 H7.5 V9.5 H0.5 Z" />
</svg>
</button>
<button
@@ -286,7 +291,10 @@ const handleBlur = () => {
@click="close"
@mousedown.stop
>
<X class="h-4 w-4" />
<!-- 关闭X 对角线 -->
<svg class="w-[10px] h-[10px]" viewBox="0 0 10 10" fill="none" stroke="currentColor" stroke-width="1.05" shape-rendering="geometricPrecision">
<path d="M0.5 0.5 L9.5 9.5 M9.5 0.5 L0.5 9.5" />
</svg>
</button>
</div>
</div>