diff --git a/frontend/src/layout/components/Sidebar/index.vue b/frontend/src/layout/components/Sidebar/index.vue index a56ff33a6..fa2c235b8 100644 --- a/frontend/src/layout/components/Sidebar/index.vue +++ b/frontend/src/layout/components/Sidebar/index.vue @@ -133,7 +133,7 @@ function getCheckedLabels(json: Node): string[] { const search = async () => { await checkIsSystemIntl(); - let checkedLabels: string | any[]; + let checkedLabels: any[] = []; if (!globalStore.isIntl) { const res = await getSettingInfo(); const json: Node = JSON.parse(res.data.xpackHideMenu); diff --git a/frontend/src/routers/index.ts b/frontend/src/routers/index.ts index 6959fec84..04a935bf4 100644 --- a/frontend/src/routers/index.ts +++ b/frontend/src/routers/index.ts @@ -10,6 +10,12 @@ router.beforeEach((to, from, next) => { axiosCanceler.removeAllPending(); const globalStore = GlobalStore(); + if (globalStore.isIntl && to.path.includes('xpack')) { + next({ name: '404' }); + NProgress.done(); + return; + } + if (to.name !== 'entrance' && !globalStore.isLogin) { next({ name: 'entrance', diff --git a/frontend/src/views/setting/panel/index.vue b/frontend/src/views/setting/panel/index.vue index d3ad848d7..0a5ce9a79 100644 --- a/frontend/src/views/setting/panel/index.vue +++ b/frontend/src/views/setting/panel/index.vue @@ -77,9 +77,10 @@ @change="onSave('Language', form.language)" v-model="form.language" > + English 中文(简体) 中文(繁體) - English + English