feat(store): 重构应用状态管理,移除旧的 app-store 并引入 app-store-auto-imports
This commit is contained in:
@@ -4,7 +4,7 @@ const appStore = useAppStore();
|
||||
const themeLabels: Record<AppThemeMode, string> = {
|
||||
light: '浅色',
|
||||
dark: '深色',
|
||||
system: '跟随系统',
|
||||
auto: '跟随系统',
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -12,7 +12,7 @@ const themeLabels: Record<AppThemeMode, string> = {
|
||||
<NTooltip :disabled="appStore.isMobile" placement="bottom-end">
|
||||
{{ themeLabels[appStore.themeMode] }}
|
||||
<template #trigger>
|
||||
<NButton quaternary @click="appStore.cycleTheme">
|
||||
<NButton quaternary @click="appStore.cycleTheme()">
|
||||
<icon-line-md-sunny-filled-loop-to-moon-filled-loop-transition
|
||||
v-if="appStore.themeMode === 'light'"
|
||||
w-4.5
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup lang="tsx">
|
||||
import { useAppStore } from '@/stores/app-store';
|
||||
import { useAppStore } from '@/stores/app-store-auto-imports';
|
||||
|
||||
const menuInstRef = useTemplateRef('menuInstRef');
|
||||
const { options, selectedKey } = useMetaLayoutsNMenuOptions({
|
||||
|
||||
Reference in New Issue
Block a user