This commit is contained in:
严浩 committed 2024-08-22 11:23:38 +08:00
1 parent ad8ca857df
commit 1e9e6a7835
3 files changed
+1074 -1111

No files matched your search

+24 -8
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();