You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
852 B
Vue
38 lines
852 B
Vue
5 months ago
|
<template>
|
||
|
<n-config-provider
|
||
|
:theme="darkTheme"
|
||
|
:hljs="hljsTheme"
|
||
|
:locale="locale"
|
||
|
:date-locale="dateLocale"
|
||
|
:theme-overrides="overridesTheme"
|
||
|
>
|
||
|
<go-app-provider>
|
||
|
<I18n></I18n>
|
||
|
<router-view></router-view>
|
||
|
</go-app-provider>
|
||
|
</n-config-provider>
|
||
|
</template>
|
||
|
|
||
|
<script lang="ts" setup>
|
||
|
import { NConfigProvider } from 'naive-ui'
|
||
|
import { GoAppProvider } from '@/components/GoAppProvider'
|
||
|
import { I18n } from '@/components/I18n'
|
||
|
import { useSystemInit, useDarkThemeHook, useThemeOverridesHook, useCode, useLang } from '@/hooks'
|
||
|
|
||
|
// 暗黑主题
|
||
|
const darkTheme = useDarkThemeHook()
|
||
|
|
||
|
// 主题配置
|
||
|
const overridesTheme = useThemeOverridesHook()
|
||
|
|
||
|
// 代码主题
|
||
|
const hljsTheme = useCode()
|
||
|
|
||
|
// 系统全局数据初始化
|
||
|
useSystemInit()
|
||
|
|
||
|
// 全局语言
|
||
|
const { locale, dateLocale } = useLang()
|
||
|
|
||
|
</script>
|