perf: 优化构建依赖加载
This commit is contained in:
17
src/main.ts
17
src/main.ts
@@ -10,7 +10,6 @@ import App from "./App.vue";
|
||||
|
||||
// ===== 样式导入 =====
|
||||
import "element-plus/theme-chalk/dark/css-vars.css";
|
||||
import "vxe-table/lib/style.css";
|
||||
import "@/styles/index.scss";
|
||||
import "uno.css";
|
||||
import "animate.css";
|
||||
@@ -24,11 +23,6 @@ import { setupI18n } from "@/lang";
|
||||
// ===== 全局组件 =====
|
||||
import * as ElementPlusIcons from "@element-plus/icons-vue";
|
||||
|
||||
// ===== 第三方插件 =====
|
||||
import VXETable from "vxe-table";
|
||||
import { InstallCodeMirror } from "codemirror-editor-vue3";
|
||||
import { configureVxeTable } from "@/plugins/vxe-table";
|
||||
|
||||
// ===== 路由守卫 =====
|
||||
import { setupPermissionGuard } from "@/router/guards/permission";
|
||||
|
||||
@@ -47,16 +41,11 @@ setupStore(app);
|
||||
// 2️⃣ 全局组件(Element Plus 图标)
|
||||
Object.entries(ElementPlusIcons).forEach(([name, comp]) => app.component(name, comp));
|
||||
|
||||
// 3️⃣ 第三方插件
|
||||
configureVxeTable();
|
||||
app.use(VXETable);
|
||||
app.use(InstallCodeMirror);
|
||||
|
||||
// 4️⃣ 路由守卫
|
||||
// 3️⃣ 路由守卫
|
||||
setupPermissionGuard();
|
||||
|
||||
// 5️⃣ SSE 初始化
|
||||
// 4️⃣ SSE 初始化
|
||||
setupSse();
|
||||
|
||||
// 6️⃣ 挂载应用
|
||||
// 5️⃣ 挂载应用
|
||||
app.mount("#app");
|
||||
|
||||
Reference in New Issue
Block a user