2025-04-18 20:09:21 +08:00
|
|
|
<script setup>
|
|
|
|
import { RouterView } from "vue-router";
|
2025-04-21 11:24:56 +08:00
|
|
|
import { onMounted } from 'vue'
|
2025-04-22 16:36:54 +08:00
|
|
|
import { useSettingsStore } from '@/store/settings';
|
|
|
|
import { setTheme } from '@/styles/theme';
|
|
|
|
|
|
|
|
const settingsStore = useSettingsStore();
|
2025-04-21 11:39:35 +08:00
|
|
|
|
|
|
|
onMounted(() => {
|
2025-04-22 16:36:54 +08:00
|
|
|
// 应用启动时,根据 store 中持久化的主题设置样式
|
|
|
|
setTheme(settingsStore.theme);
|
|
|
|
});
|
2025-04-18 20:09:21 +08:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
|
|
|
<router-view></router-view>
|
|
|
|
</template>
|
|
|
|
|
2025-04-22 16:36:54 +08:00
|
|
|
<style lang="scss">
|
|
|
|
html, body, #app {
|
|
|
|
height: 100%;
|
|
|
|
margin: 0;
|
|
|
|
padding: 0;
|
|
|
|
font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '\5FAE\8F6F\96C5\9ED1', Arial, sans-serif;
|
|
|
|
-webkit-font-smoothing: antialiased;
|
|
|
|
-moz-osx-font-smoothing: grayscale;
|
|
|
|
background-color: var(--el-bg-color);
|
|
|
|
color: var(--el-text-color-primary);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* 自定义滚动条样式 */
|
|
|
|
::-webkit-scrollbar {
|
|
|
|
width: 6px; /* 滚动条宽度 */
|
|
|
|
height: 6px; /* 滚动条高度,主要用于水平滚动条 */
|
|
|
|
}
|
|
|
|
|
|
|
|
::-webkit-scrollbar-track {
|
|
|
|
background: transparent; /* 滚动条轨道背景 */
|
|
|
|
border-radius: 3px;
|
2025-04-18 20:09:21 +08:00
|
|
|
}
|
2025-04-22 16:36:54 +08:00
|
|
|
|
|
|
|
::-webkit-scrollbar-thumb {
|
|
|
|
background: rgba(144, 147, 153, 0.3); /* 滚动条滑块颜色 */
|
|
|
|
border-radius: 3px;
|
2025-04-18 20:09:21 +08:00
|
|
|
}
|
2025-04-22 16:36:54 +08:00
|
|
|
|
|
|
|
::-webkit-scrollbar-thumb:hover {
|
|
|
|
background: rgba(144, 147, 153, 0.5); /* 悬停时滑块颜色 */
|
|
|
|
}
|
|
|
|
|
|
|
|
// 全局动画控制
|
|
|
|
body.no-animations {
|
|
|
|
* {
|
|
|
|
transition: none !important;
|
|
|
|
animation: none !important;
|
|
|
|
}
|
2025-04-18 20:09:21 +08:00
|
|
|
}
|
|
|
|
</style>
|