mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-01 16:13:04 +00:00
fix: cannot access uninitialized variable on Safari (#308)
This commit is contained in:
parent
39c584bce6
commit
344f2a6608
@ -16,7 +16,6 @@
|
|||||||
*/
|
*/
|
||||||
import { createApp } from "vue";
|
import { createApp } from "vue";
|
||||||
import App from "./App.vue";
|
import App from "./App.vue";
|
||||||
import router from "./router";
|
|
||||||
import { store } from "./store";
|
import { store } from "./store";
|
||||||
import components from "@/components";
|
import components from "@/components";
|
||||||
import i18n from "./locales";
|
import i18n from "./locales";
|
||||||
@ -33,6 +32,9 @@ app.use(store);
|
|||||||
mountApp();
|
mountApp();
|
||||||
|
|
||||||
async function mountApp() {
|
async function mountApp() {
|
||||||
|
await appStore.getActivateMenus();
|
||||||
await appStore.queryOAPTimeInfo();
|
await appStore.queryOAPTimeInfo();
|
||||||
app.use(router).mount("#app");
|
|
||||||
|
const router = await import("./router");
|
||||||
|
app.use(router.default).mount("#app");
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@ import { routesAlarm } from "./alarm";
|
|||||||
import routesLayers from "./layer";
|
import routesLayers from "./layer";
|
||||||
import { routesSettings } from "./settings";
|
import { routesSettings } from "./settings";
|
||||||
|
|
||||||
const routes: Array<RouteRecordRaw> = [
|
const routes: RouteRecordRaw[] = [
|
||||||
...routesMarketplace,
|
...routesMarketplace,
|
||||||
...routesLayers,
|
...routesLayers,
|
||||||
...routesAlarm,
|
...routesAlarm,
|
||||||
|
@ -18,9 +18,8 @@ import Layout from "@/layout/Index.vue";
|
|||||||
import { useAppStoreWithOut } from "@/store/modules/app";
|
import { useAppStoreWithOut } from "@/store/modules/app";
|
||||||
import type { MenuOptions } from "@/types/app";
|
import type { MenuOptions } from "@/types/app";
|
||||||
|
|
||||||
async function layerDashboards() {
|
function layerDashboards() {
|
||||||
const appStore = useAppStoreWithOut();
|
const appStore = useAppStoreWithOut();
|
||||||
await appStore.getActivateMenus();
|
|
||||||
const routes = appStore.allMenus.map((item: MenuOptions) => {
|
const routes = appStore.allMenus.map((item: MenuOptions) => {
|
||||||
const route: any = {
|
const route: any = {
|
||||||
path: "",
|
path: "",
|
||||||
@ -84,4 +83,4 @@ async function layerDashboards() {
|
|||||||
return routes;
|
return routes;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default await layerDashboards();
|
export default layerDashboards();
|
||||||
|
@ -79,7 +79,7 @@ export default ({ mode }: ConfigEnv): UserConfig => {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
build: {
|
build: {
|
||||||
target: "esnext",
|
target: "es2015",
|
||||||
outDir: OUTPUT_DIR,
|
outDir: OUTPUT_DIR,
|
||||||
manifest: false,
|
manifest: false,
|
||||||
sourcemap: false,
|
sourcemap: false,
|
||||||
|
Loading…
Reference in New Issue
Block a user