From d920d0130b4e2bb6e83d3d9a5717da1c19d7dc09 Mon Sep 17 00:00:00 2001 From: caill <815519168@qq.com> Date: Fri, 26 May 2023 16:01:24 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B7=AF=E7=94=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 43 -------------------------------- src/i18n/i18n.js | 2 +- src/pages/shells/index/index.vue | 16 ++++++++---- 3 files changed, 12 insertions(+), 49 deletions(-) diff --git a/index.html b/index.html index e001420..a41fdf8 100644 --- a/index.html +++ b/index.html @@ -3,51 +3,8 @@ apt-nl - - - -
- diff --git a/src/i18n/i18n.js b/src/i18n/i18n.js index 71aefd3..8ead72f 100644 --- a/src/i18n/i18n.js +++ b/src/i18n/i18n.js @@ -13,7 +13,7 @@ const messages = { zh: Object.assign(zh, zhLocale) } -console.log(messages.zh) +// console.log(messages.zh) const i18n = new VueI18n({ locale: localStorage.getItem('locale') || 'zh', diff --git a/src/pages/shells/index/index.vue b/src/pages/shells/index/index.vue index 9eeb803..d0b11d9 100644 --- a/src/pages/shells/index/index.vue +++ b/src/pages/shells/index/index.vue @@ -116,13 +116,9 @@ export default { label: '示教', index: '5', router: '/teach' - }, { - label: '地图', - index: '6', - router: '' }, { label: '系统管理', - index: '7', + index: '6', router: '/user' }], dropdown: false, @@ -132,6 +128,16 @@ export default { unclick: false } }, + beforeRouteEnter (to, from, next) { + next(vm => { + vm.menus.map(el => { + if (el.router === vm.$route.path) { + vm.activeIndex = el.index + vm.$store.dispatch('getDefaultActive', el.index) + } + }) + }) + }, watch: { oldpassword (val) { if (val === '' || this.newpassword1 === '' || this.newpassword2 === '') {