diff --git a/src/renderer/src/assets/base.css b/src/renderer/src/assets/base.css index 4d20b4c..5c751c8 100644 --- a/src/renderer/src/assets/base.css +++ b/src/renderer/src/assets/base.css @@ -37,3 +37,28 @@ body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } + +/* 全局滚动条样式 */ +* { + &::-webkit-scrollbar { + width: 0.375rem; + } + + &::-webkit-scrollbar-track { + background: #f1f5f9; + border-radius: 0.1875rem; + } + + &::-webkit-scrollbar-thumb { + background: #cbd5e1; + border-radius: 0.1875rem; + transition: background-color 0.2s ease; + + &:hover { + background: #94a3b8; + } + } + /* Firefox 滚动条样式 */ + scrollbar-width: thin; + scrollbar-color: #cbd5e1 #f1f5f9; +} \ No newline at end of file diff --git a/src/renderer/src/components/TitleBarControls.vue b/src/renderer/src/components/TitleBarControls.vue index 05a98b0..fb08dad 100644 --- a/src/renderer/src/components/TitleBarControls.vue +++ b/src/renderer/src/components/TitleBarControls.vue @@ -9,11 +9,15 @@ type ControlStyle = 'traffic-light' | 'windows' interface Props { controlStyle?: ControlStyle showSettings?: boolean + showBack?: boolean + title?: string } const props = withDefaults(defineProps(), { controlStyle: 'windows', - showSettings: true + showSettings: true, + showBack: false, + title: '' }) // Mini 模式现在是直接隐藏到系统托盘,不需要状态跟踪 @@ -49,10 +53,34 @@ const handleSettings = (): void => { // 跳转到设置页面 router.push('/settings') } + +const handleBack = (): void => { + // 返回上一页 + router.back() +}