feat(projects): 添加NaiveProvider组件

This commit is contained in:
Soybean
2022-01-05 19:06:23 +08:00
parent 5bfb8199b4
commit c804b21ceb
6 changed files with 54 additions and 4 deletions

View File

@ -1,11 +1,20 @@
<template>
<n-config-provider :theme="theme.naiveTheme" :theme-overrides="theme.naiveThemeOverrides" class="h-full">
<slot></slot>
<n-config-provider
:theme="theme.naiveTheme"
:theme-overrides="theme.naiveThemeOverrides"
:locale="zhCN"
:date-locale="dateZhCN"
class="h-full"
>
<naive-provider>
<slot></slot>
</naive-provider>
</n-config-provider>
</template>
<script setup lang="ts">
import { NConfigProvider } from 'naive-ui';
import { NConfigProvider, zhCN, dateZhCN } from 'naive-ui';
import { NaiveProvider } from '@/components';
import { useThemeStore } from '@/store';
const theme = useThemeStore();