| 1 | import { createApp } from 'vue' |
| 2 | import App from './App.vue' |
| 3 | import router from './router' |
| 4 | import pinia from './stores' |
| 5 | import ElementPlus from 'element-plus' |
| 6 | import 'element-plus/dist/index.css' |
| 7 | import * as ElementPlusIconsVue from '@element-plus/icons-vue' |
| 8 | import './styles/index.scss' |
| 9 | |
| 10 | const app = createApp(App) |
| 11 | |
| 12 | // 注册 Element Plus 图标 |
| 13 | for (const [key, component] of Object.entries(ElementPlusIconsVue)) { |
| 14 | app.component(key, component) |
| 15 | } |
| 16 | |
| 17 | app.use(router) |
| 18 | app.use(pinia) |
| 19 | app.use(ElementPlus) |
| 20 | app.mount('#app') |
| 21 |