feat: 后台语言包合并默认中文、日夜主题切换、官方侧栏收缩、追溯码分组与批量
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+10
-2
@@ -1,5 +1,11 @@
|
||||
<template>
|
||||
<n-config-provider :theme-overrides="themeOverrides" :locale="naiveLocale" :date-locale="naiveDateLocale">
|
||||
<n-config-provider
|
||||
:theme="isDark ? darkTheme : null"
|
||||
:theme-overrides="themeOverrides"
|
||||
:locale="naiveLocale"
|
||||
:date-locale="naiveDateLocale"
|
||||
>
|
||||
<n-global-style />
|
||||
<router-view />
|
||||
</n-config-provider>
|
||||
</template>
|
||||
@@ -7,10 +13,12 @@
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { zhCN, dateZhCN, enUS, dateEnUS } from 'naive-ui';
|
||||
import { darkTheme, zhCN, dateZhCN, enUS, dateEnUS } from 'naive-ui';
|
||||
import { themeOverrides } from '@/theme';
|
||||
import { useTheme } from '@/composables/useTheme';
|
||||
|
||||
const { locale } = useI18n();
|
||||
const { isDark } = useTheme();
|
||||
const naiveLocale = computed(() => (locale.value === 'en-US' ? enUS : zhCN));
|
||||
const naiveDateLocale = computed(() => (locale.value === 'en-US' ? dateEnUS : dateZhCN));
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user