2025-09-01 18:18:44 +08:00
|
|
|
// src/main.ts
|
2025-08-31 23:25:36 +08:00
|
|
|
import { createApp } from 'vue'
|
|
|
|
|
import App from './App.vue'
|
2025-09-01 18:18:44 +08:00
|
|
|
import router from './router' // 新增
|
|
|
|
|
import { createPinia } from 'pinia'
|
|
|
|
|
import Antd from 'ant-design-vue'
|
|
|
|
|
import 'ant-design-vue/dist/reset.css'
|
2025-09-03 21:42:51 +08:00
|
|
|
import icons from './icons'
|
2025-08-31 23:25:36 +08:00
|
|
|
|
2025-09-01 18:18:44 +08:00
|
|
|
const app = createApp(App)
|
2025-09-02 00:11:55 +08:00
|
|
|
const pinia = createPinia()
|
|
|
|
|
|
2025-09-01 18:18:44 +08:00
|
|
|
app.use(createPinia()) // 注册Pinia
|
|
|
|
|
app.use(router) // 注册路由
|
2025-09-02 00:11:55 +08:00
|
|
|
app.use(pinia);
|
2025-09-01 18:18:44 +08:00
|
|
|
app.use(Antd) // 注册Ant Design Vue
|
2025-09-03 21:42:51 +08:00
|
|
|
Object.entries(icons).forEach(([name, component]) => {
|
|
|
|
|
app.component(name, component)
|
|
|
|
|
})
|
2025-09-01 18:18:44 +08:00
|
|
|
app.mount('#app')
|