jiangchengfeiyi-Web/src/main.ts

24 lines
567 B
TypeScript
Raw Normal View History

2024-10-23 09:55:22 +00:00
import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import './assets/gloable.css'
2024-10-27 10:08:43 +00:00
import pinia from './store'
2024-10-23 09:55:22 +00:00
const app = createApp(App)
2024-10-27 10:08:43 +00:00
//全局注册图标组件
2024-10-23 09:55:22 +00:00
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
app.component(key, component)
}
2024-10-27 10:08:43 +00:00
//
2024-10-23 09:55:22 +00:00
app.use(ElementPlus, {size: 'small'})
2024-10-27 10:08:43 +00:00
//配置路由
2024-10-23 09:55:22 +00:00
app.use(router)
2024-10-27 10:08:43 +00:00
//使用pinia
app.use(pinia)
2024-10-23 09:55:22 +00:00
app.mount('#app')