Files
pqs-9100_client/frontend/src/main.ts

38 lines
804 B
TypeScript
Raw Normal View History

import { createApp } from 'vue'
2024-08-19 14:01:14 +08:00
import App from './App.vue'
2024-08-07 21:48:57 +08:00
// element-plus
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
// 使用pinia
import pinia from '@/stores'
2024-08-19 14:01:14 +08:00
// 导入路由
import Router from './router/index'
2024-08-19 14:01:14 +08:00
// 引入项目主CSS
2024-08-07 21:48:57 +08:00
import '@/assets/styles/tailMain.css'
// 导入全局注册的组件
import 'virtual:svg-icons-register'
import registerGlobComp from '@/components'
2024-08-07 21:48:57 +08:00
//创建实例
const app = createApp(App)
const setupAll = async () => {
app
.use(Router) // 使用路由
.use(ElementPlus) // 使用ele-plus组件
.use(pinia) // 使用pinia
.use(registerGlobComp) // 使用全局自定义组件
//待路由初始化完毕后挂载app
await Router.isReady()
2024-08-07 21:48:57 +08:00
}
2024-08-07 21:48:57 +08:00
//挂载app
setupAll().then(() => {
app.mount('#app')
})