Files
ruoyi-plus-soybean/src/AppProvider.vue
2021-12-12 21:43:26 +08:00

34 lines
774 B
Vue

<template>
<n-config-provider
class="h-full"
:locale="zhCN"
:date-locale="dateZhCN"
:theme="naiveTheme"
:theme-overrides="theme.themeOverrids"
>
<n-element class="h-full">
<naive-provider>
<slot></slot>
</naive-provider>
</n-element>
</n-config-provider>
</template>
<script lang="ts" setup>
import { NConfigProvider, NElement, zhCN, dateZhCN } from 'naive-ui';
import { NaiveProvider } from '@/components';
import { useThemeStore } from '@/store';
import { useDarkMode, useGlobalEvent } from '@/composables';
const theme = useThemeStore();
const { naiveTheme } = useDarkMode();
const { initGlobalEventListener } = useGlobalEvent();
function init() {
initGlobalEventListener();
}
init();
</script>
<style></style>