2026-04-17 15:45:54 +08:00
|
|
|
// src/main.ts
|
|
|
|
|
import { createApp } from 'vue'
|
|
|
|
|
import { createPinia } from 'pinia'
|
|
|
|
|
import ElementPlus from 'element-plus'
|
|
|
|
|
import 'element-plus/dist/index.css'
|
2026-04-17 16:35:45 +08:00
|
|
|
import './assets/design.css'
|
2026-04-17 15:45:54 +08:00
|
|
|
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
|
|
|
|
|
import App from './App.vue'
|
|
|
|
|
import router from './router'
|
|
|
|
|
|
|
|
|
|
const app = createApp(App)
|
|
|
|
|
const pinia = createPinia()
|
|
|
|
|
|
|
|
|
|
// 注册所有 Element Plus 图标
|
|
|
|
|
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
|
|
|
|
|
app.component(key, component)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
app.use(pinia)
|
|
|
|
|
app.use(router)
|
|
|
|
|
app.use(ElementPlus)
|
|
|
|
|
|
|
|
|
|
app.mount('#app')
|