2026-03-11 14:26:33 +08:00
|
|
|
import { createApp, type Component } from 'vue'
|
2026-03-05 10:49:46 +08:00
|
|
|
import { createPinia } from 'pinia'
|
|
|
|
|
import ElementPlus from 'element-plus'
|
|
|
|
|
import 'element-plus/dist/index.css'
|
|
|
|
|
import router from './router'
|
2026-03-07 09:11:08 +08:00
|
|
|
import './assets/styles/index.css'
|
2026-03-05 10:49:46 +08:00
|
|
|
import App from './App.vue'
|
|
|
|
|
|
2026-03-11 14:26:33 +08:00
|
|
|
// 全局注册 Lucide 图标
|
|
|
|
|
import * as iconModule from 'lucide-vue-next'
|
|
|
|
|
|
2026-03-05 10:49:46 +08:00
|
|
|
const app = createApp(App)
|
|
|
|
|
|
2026-03-11 14:26:33 +08:00
|
|
|
// 注册所有图标为全局组件(过滤非组件)
|
|
|
|
|
for (const [name, icon] of Object.entries(iconModule)) {
|
|
|
|
|
if (typeof icon === 'object' && icon !== null && 'render' in icon) {
|
|
|
|
|
app.component(name, icon as Component)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-05 10:49:46 +08:00
|
|
|
app.use(createPinia())
|
|
|
|
|
app.use(router)
|
|
|
|
|
app.use(ElementPlus)
|
|
|
|
|
|
|
|
|
|
app.mount('#app')
|