mod: 调整setupApp相关写法
This commit is contained in:
parent
dfcc8c2158
commit
437d87f19e
10
src/main.js
10
src/main.js
@ -2,18 +2,18 @@ import '@/styles/index.scss'
|
||||
import 'uno.css'
|
||||
|
||||
import { createApp } from 'vue'
|
||||
import App from './App.vue'
|
||||
|
||||
import { setupRouter } from '@/router'
|
||||
import { setupStore } from '@/store'
|
||||
import App from './App.vue'
|
||||
|
||||
async function bootstrap() {
|
||||
async function setupApp() {
|
||||
const app = createApp(App)
|
||||
|
||||
setupStore(app)
|
||||
setupRouter(app)
|
||||
|
||||
await setupRouter(app)
|
||||
|
||||
app.mount('#app', true)
|
||||
}
|
||||
|
||||
bootstrap()
|
||||
setupApp()
|
||||
|
@ -18,7 +18,8 @@ export function resetRouter() {
|
||||
})
|
||||
}
|
||||
|
||||
export function setupRouter(app) {
|
||||
export async function setupRouter(app) {
|
||||
app.use(router)
|
||||
setupRouterGuard(router)
|
||||
await router.isReady()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user