Childish-Ghost 8a14ba44a4 V0.1.2.20250718
———————————————
1.路由重定向
2.Home页面头部完成
———————————————
2025-07-18 22:44:40 +08:00

27 lines
736 B
TypeScript

import './assets/main.css'
import { createApp } from 'vue'
import App from './App.vue'
import ElementPlus from 'element-plus'
import * as ElementPlusIconsVue from '@element-plus/icons-vue' // 图标导入
import 'element-plus/dist/index.css'
import router from './router/router'
import axios from 'axios'
const app = createApp(App)
// 全局注册所有Element Plus图标
Object.keys(ElementPlusIconsVue).forEach(key => {
// 使用类型断言确保类型正确
app.component(key, (ElementPlusIconsVue as Record<string, any>)[key])
})
// 安装插件
app.use(router)
.use(ElementPlus)
// 全局使用axios挂载到app.config.globalProperties
app.config.globalProperties.$axios = axios
// 挂载应用
app.mount('#app')