refactor(projects): refactor app-loading

This commit is contained in:
Soybean
2024-01-20 19:13:31 +08:00
parent 726abe4208
commit b4f3dd2f7a
7 changed files with 60 additions and 71 deletions

View File

@@ -4,7 +4,6 @@ import { NConfigProvider, darkTheme } from 'naive-ui';
import { useAppStore } from './store/modules/app';
import { useThemeStore } from './store/modules/theme';
import { naiveDateLocales, naiveLocales } from './locales/naive';
import AppLoading from './components/common/app-loading.vue';
defineOptions({
name: 'App'
@@ -25,22 +24,17 @@ const naiveDateLocale = computed(() => {
</script>
<template>
<Suspense>
<NConfigProvider
:theme="naiveDarkTheme"
:theme-overrides="themeStore.naiveTheme"
:locale="naiveLocale"
:date-locale="naiveDateLocale"
class="h-full"
>
<AppProvider>
<RouterView class="bg-layout" />
</AppProvider>
</NConfigProvider>
<template #fallback>
<AppLoading />
</template>
</Suspense>
<NConfigProvider
:theme="naiveDarkTheme"
:theme-overrides="themeStore.naiveTheme"
:locale="naiveLocale"
:date-locale="naiveDateLocale"
class="h-full"
>
<AppProvider>
<RouterView class="bg-layout" />
</AppProvider>
</NConfigProvider>
</template>
<style scoped></style>