perf: 页面初始化时先加载pinia再加载router,兼容更多使用场景 (#649)

This commit is contained in:
hu 2023-07-19 00:09:22 +08:00 committed by GitHub
parent 3afafa6f61
commit d27c0623c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -46,10 +46,10 @@ import { Auth } from "@/components/ReAuth";
app.component("Auth", Auth); app.component("Auth", Auth);
getServerConfig(app).then(async config => { getServerConfig(app).then(async config => {
setupStore(app);
app.use(router); app.use(router);
await router.isReady(); await router.isReady();
injectResponsiveStorage(app, config); injectResponsiveStorage(app, config);
setupStore(app);
app app
.use(MotionPlugin) .use(MotionPlugin)
.use(useI18n) .use(useI18n)