This commit is contained in:
严浩
2024-08-22 10:42:41 +08:00
parent ad8ca857df
commit 1e9e6a7835
3 changed files with 1074 additions and 1111 deletions

View File

@ -9,11 +9,27 @@ import App from './App.vue';
import { router } from './router';
import { DataLoaderPlugin } from 'unplugin-vue-router/data-loaders';
createApp(App)
.use(createHead())
.use(createPinia())
// Register the plugin before the router
.use(DataLoaderPlugin, { router })
// adding the router will trigger the initial navigation
.use(router)
.mount('#app');
async function init() {
if (import.meta.env.MODE === 'development' || 1 === 1) {
// https://eruda.liriliri.io/zh/docs/#快速上手
await import('eruda').then(({ default: eruda }) => {
eruda.init({
defaults: {
transparency: 0.9,
},
});
eruda.show();
});
}
createApp(App)
.use(createHead())
.use(createPinia())
// Register the plugin before the router
.use(DataLoaderPlugin, { router })
// adding the router will trigger the initial navigation
.use(router)
.mount('#app');
}
init();