20 lines
551 B
JavaScript
20 lines
551 B
JavaScript
// src/main.ts
|
|
import { createApp } from 'vue'
|
|
import App from './App.vue'
|
|
import router from './router' // 新增
|
|
import { createPinia } from 'pinia'
|
|
import Antd from 'ant-design-vue'
|
|
import 'ant-design-vue/dist/reset.css'
|
|
import icons from './icons'
|
|
|
|
const app = createApp(App)
|
|
const pinia = createPinia()
|
|
|
|
app.use(createPinia()) // 注册Pinia
|
|
app.use(router) // 注册路由
|
|
app.use(pinia);
|
|
app.use(Antd) // 注册Ant Design Vue
|
|
Object.entries(icons).forEach(([name, component]) => {
|
|
app.component(name, component)
|
|
})
|
|
app.mount('#app') |