Register only used Element Plus components
This commit is contained in:
@@ -8,8 +8,6 @@ import '@vben/styles';
|
||||
import '@vben/styles/ele';
|
||||
|
||||
import { useTitle } from '@vueuse/core';
|
||||
import ElementPlus from 'element-plus';
|
||||
import { ElLoading } from 'element-plus';
|
||||
|
||||
import { $t, setupI18n } from '#/locales';
|
||||
|
||||
@@ -17,6 +15,7 @@ import { initComponentAdapter } from './adapter/component';
|
||||
import { initSetupVbenForm, useVbenForm } from './adapter/form';
|
||||
import App from './app.vue';
|
||||
import { setupZqTable } from './components/zq-table';
|
||||
import { setupElementPlus } from './plugins/element-plus';
|
||||
import { router } from './router';
|
||||
|
||||
async function bootstrap(namespace: string) {
|
||||
@@ -41,10 +40,7 @@ async function bootstrap(namespace: string) {
|
||||
// });
|
||||
const app = createApp(App);
|
||||
|
||||
app.use(ElementPlus);
|
||||
|
||||
// 注册Element Plus提供的v-loading指令
|
||||
app.directive('loading', ElLoading.directive);
|
||||
setupElementPlus(app);
|
||||
|
||||
// 注册Vben提供的v-loading和v-spinning指令
|
||||
registerLoadingDirective(app, {
|
||||
|
||||
Reference in New Issue
Block a user