chore(@vben/web-naive): Import on demand

pull/48/MERGE
Li Kui 2024-07-31 21:48:37 +08:00
parent 082847c441
commit 1c9525a013
4 changed files with 10 additions and 6 deletions

View File

@ -11,6 +11,9 @@ import {
enUS,
GlobalThemeOverrides,
lightTheme,
NConfigProvider,
NMessageProvider,
NNotificationProvider,
zhCN,
} from 'naive-ui';

View File

@ -5,8 +5,6 @@ import { initStores } from '@vben/stores';
import '@vben/styles';
import '@vben/styles/antd';
import naive from 'naive-ui';
import { setupI18n } from '#/locales';
import App from './app.vue';
@ -27,8 +25,6 @@ async function bootstrap(namespace: string) {
// 配置路由及路由守卫
app.use(router);
app.use(naive);
app.mount('#app');
}

View File

@ -15,14 +15,13 @@ const routes: RouteRecordRaw[] = [
name: 'Demos',
path: '/demos',
children: [
// 权限控制
{
meta: {
icon: 'mdi:shield-key-outline',
title: $t('page.demos.naive'),
},
name: 'NaiveDemos',
path: '/demos/access',
path: '/demos/naive',
component: () => import('#/views/demos/naive/index.vue'),
},
],

View File

@ -129,6 +129,12 @@ pnpm dev:antd
pnpm dev:naive
```
运行 `web-ele` 应用:
```bash
pnpm dev:ele
```
运行 `website` 应用:
```bash