소스 검색

fix: router is initialized first

xiaoxian521 3 년 전
부모
커밋
67bc933d5c
1개의 변경된 파일3개의 추가작업 그리고 7개의 파일을 삭제
  1. 3 7
      src/main.ts

+ 3 - 7
src/main.ts

@@ -37,14 +37,10 @@ app.component("IconifyIconOnline", IconifyIconOnline);
 app.component("FontIcon", FontIcon);
 
 getServerConfig(app).then(async config => {
+  app.use(router);
+  await router.isReady();
   injectResponsiveStorage(app, config);
   setupStore(app);
-  app
-    .use(router)
-    .use(MotionPlugin)
-    .use(useElementPlus)
-    .use(useTable)
-    .use(usI18n);
-  await router.isReady();
+  app.use(MotionPlugin).use(useElementPlus).use(useTable).use(usI18n);
   app.mount("#app");
 });