From 9b563b82155efdeea891188f67edae1339f6f774 Mon Sep 17 00:00:00 2001 From: mayiming <1627832236@qq.com> Date: Wed, 10 Dec 2025 17:03:15 +0800 Subject: [PATCH] Integrate Element Plus UI library and register icons in main.ts --- src/main.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main.ts b/src/main.ts index fda1e6e..0762e22 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,12 +1,21 @@ import { createApp } from 'vue' import { createPinia } from 'pinia' +import ElementPlus from 'element-plus' +import 'element-plus/dist/index.css' +import * as ElementPlusIconsVue from '@element-plus/icons-vue' import App from './App.vue' import router from './router' const app = createApp(App) +// 注册 Element Plus 图标 +for (const [key, component] of Object.entries(ElementPlusIconsVue)) { + app.component(key, component) +} + app.use(createPinia()) app.use(router) +app.use(ElementPlus) app.mount('#app')