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, enUS,
GlobalThemeOverrides, GlobalThemeOverrides,
lightTheme, lightTheme,
NConfigProvider,
NMessageProvider,
NNotificationProvider,
zhCN, zhCN,
} from 'naive-ui'; } from 'naive-ui';

View File

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

View File

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

View File

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