Files
lilishop-ui/seller/src/plugins/element.js
lifenlong 2a2c3f8174 perf(seller): Element Plus 按需引入 + 移除未使用的 vue-lazyload
- plugins/element.js 不再全量注册,组件由 unplugin-vue-components 按模板自动按需解析;
  v-loading 指令与全局配置(zhCn/size)单独保留
- chunk-framework 344KB → 279KB(gzip,-19%);样式仍走全量 CSS 保证覆盖顺序不变
- 修复 unplugin-vue-components 与 minimatch 的版本兼容(锁定 0.27.5 + resolutions 嵌套 v9)
- 移除全局注册但零使用的 vue-lazyload
2026-10-13 07:39:35 +08:00

19 lines
536 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { ElLoading, provideGlobalConfig } from "element-plus";
import zhCn from "element-plus/es/locale/lang/zh-cn";
import "element-plus/dist/index.css";
import "@/styles/element.scss";
// Element Plus 组件经 unplugin-vue-components 按需引入(见 vue.config.js),
// 此处仅注册指令(v-loading 不走按需解析)与全局配置(语言/尺寸)
export function setupElementPlus(app) {
app.use(ElLoading);
provideGlobalConfig(
{
locale: zhCn,
size: "default",
},
app,
true
);
}