Skip to content

Commit

Permalink
chore(App): router加载完成再mount
Browse files Browse the repository at this point in the history
  • Loading branch information
Qiu-Jun committed Jun 14, 2024
1 parent 3f9f30f commit e9c6d1c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 20 deletions.
14 changes: 0 additions & 14 deletions src/App.tsx

This file was deleted.

18 changes: 12 additions & 6 deletions src/main.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createApp } from 'vue';
import App from './App';
import App from './App.vue';
import router from './router';
import ViewUiPlus from 'view-ui-plus';
import 'view-ui-plus/dist/styles/viewuiplus.css';
Expand All @@ -12,8 +12,14 @@ import { VueMasonryPlugin } from 'vue-masonry';

import i18n from './language/index';

const app = createApp(App);

app.use(VueMasonryPlugin);

app.use(router).use(i18n).use(VueLazyLoad, {}).use(ViewUiPlus).mount('#app');
async function bootstrap() {
const app = createApp(App);
app.use(VueMasonryPlugin);
app.use(router);
app.use(i18n);
app.use(VueLazyLoad, {});
app.use(ViewUiPlus);
await router.isReady();
app.mount('#app');
}
bootstrap();

0 comments on commit e9c6d1c

Please sign in to comment.