1234567891011121314151617181920212223242526272829303132333435 |
- import 'virtual:uno.css'
- //主要
- import { createApp } from 'vue'
- import setupPinia from './store/init'
- import router, { setupRouter } from './router'
- import App from './App.vue'
- //挂载全局
- import { setupComponents } from './components'
- import { setupInstall } from './components/install'
- //创建实例
- async function bootstrap() {
- const app = createApp(App)
- // 挂载状态管理
- app.use(setupPinia)
- // 挂载路由
- await setupRouter(app)
- // 路由准备就绪后挂载APP实例
- await router.isReady()
- // 挂载全局组件
- setupInstall(app)
- // 组件注册全局
- setupComponents(app)
- app.mount('#app')
- }
- // eslint-disable-next-line no-void
- void bootstrap()
|