mirror of https://github.com/halo-dev/halo-admin
parent
e13b4977bd
commit
7e08350da5
11
src/main.ts
11
src/main.ts
|
@ -201,13 +201,20 @@ async function initApp() {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
loadCoreModules();
|
loadCoreModules();
|
||||||
|
|
||||||
|
try {
|
||||||
await loadPluginModules();
|
await loadPluginModules();
|
||||||
|
} catch (e) {
|
||||||
|
console.error("Failed to load plugins", e);
|
||||||
|
}
|
||||||
|
|
||||||
await loadCurrentUser();
|
await loadCurrentUser();
|
||||||
app.provide<MenuGroupType[]>("menus", menus);
|
|
||||||
app.provide<MenuItemType[]>("minimenus", minimenus);
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
} finally {
|
} finally {
|
||||||
|
app.provide<MenuGroupType[]>("menus", menus);
|
||||||
|
app.provide<MenuItemType[]>("minimenus", minimenus);
|
||||||
|
|
||||||
app.use(router);
|
app.use(router);
|
||||||
app.mount("#app");
|
app.mount("#app");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue