App.vue 477 B

123456789101112131415161718192021222324
  1. <template>
  2. <router-view />
  3. </template>
  4. <script setup>
  5. import useSettingsStore from '@/store/modules/settings'
  6. import { handleThemeStyle } from '@/utils/theme'
  7. onMounted(() => {
  8. nextTick(() => {
  9. // 初始化主题样式
  10. handleThemeStyle(useSettingsStore().theme)
  11. })
  12. })
  13. </script>
  14. <style>
  15. :root {
  16. --el-color-primary: #2D71FF;
  17. --el-color-primary-light-3: #46a6ff; /* 可选,调整不同亮度 */
  18. --el-color-primary-dark-2: #0e8afd; /* 可选 */
  19. }
  20. </style>