perf: defer admin runtime from bootstrap
This commit is contained in:
@@ -8,28 +8,13 @@ import '@vben/styles';
|
||||
import '@vben/styles/ele';
|
||||
|
||||
import { useTitle } from '@vueuse/core';
|
||||
import ElementPlus from 'element-plus';
|
||||
|
||||
import { $t, setupI18n } from '#/locales';
|
||||
|
||||
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) {
|
||||
// 初始化组件适配器
|
||||
await initComponentAdapter();
|
||||
|
||||
// 初始化表单组件
|
||||
await initSetupVbenForm();
|
||||
|
||||
// 初始化 ZqTable (注入 form)
|
||||
setupZqTable({
|
||||
useVbenForm,
|
||||
});
|
||||
|
||||
// // 设置弹窗的默认配置
|
||||
// setDefaultModalProps({
|
||||
// fullscreenButton: false,
|
||||
@@ -40,7 +25,7 @@ async function bootstrap(namespace: string) {
|
||||
// });
|
||||
const app = createApp(App);
|
||||
|
||||
app.use(ElementPlus);
|
||||
setupElementPlus(app);
|
||||
|
||||
// 注册Element Plus提供的v-loading指令
|
||||
|
||||
|
||||
Reference in New Issue
Block a user