From ac687d46631445a2ad0efebe843c300535277dec Mon Sep 17 00:00:00 2001 From: Surpriseplus <845948745@qq.com> Date: 星期一, 28 十一月 2022 22:02:54 +0800 Subject: [PATCH] 1 --- src/components/navMenu.vue | 41 ++++++++--------------------------------- 1 files changed, 8 insertions(+), 33 deletions(-) diff --git a/src/components/navMenu.vue b/src/components/navMenu.vue index a4db331..4a84824 100644 --- a/src/components/navMenu.vue +++ b/src/components/navMenu.vue @@ -124,41 +124,21 @@ mounted() { this.getMenuTree(); }, - computed: { - // 鎴戜滑浣跨敤璁$畻灞炴�ф潵鑾峰彇鍒板綋鍓嶇偣鍑荤殑鑿滃崟鐨勮矾鐢辫矾寰勶紝鐒跺悗璁剧疆default-active涓殑鍊� - // 浣垮緱鑿滃崟鍦ㄨ浇鍏ユ椂灏辫兘瀵瑰簲楂樹寒 - // activeIndex() { - // const route = this.$route; - // const { meta, path } = route; - // // if set path, the sidebar will highlight the path you set - // // 鍙互鍦ㄨ矾鐢遍厤缃枃浠朵腑璁剧疆鑷畾涔夌殑璺敱璺緞鍒癿eta.activeMenu灞炴�т腑锛屾潵鎺у埗鑿滃崟鑷畾涔夐珮浜樉绀� - // if (meta.activeMenu) { - // return meta.activeMenu; - // } - // return path; - // }, - }, + computed: {}, methods: { //涓婚鍒囨崲 - setThemeColors() { - // var value; - // if (this.themeColor) { - // value = '#303030'; - // } else { - // value = '#409EFF'; - // } - // localStorage.setItem('theme', value); - // this.$store.commit('setSkin', value); - }, + setThemeColors() {}, //榧犳爣绉诲叆鑿滃崟浜嬩欢 setMenuMove(index, item) { var that = this; if (item.perms != null) { this.$router.push(item.url); - this.setShowFalseDiv(false); - this.changeliSelect = '鍛靛懙'; - this.showFlag = null; + if (this.showFlag != null) { + this.setShowFalseDiv(false); + this.changeliSelect = '鍛靛懙'; + this.showFlag = null; + } } else { if (this.showFlag != index) { this.showFlag = index; @@ -182,14 +162,9 @@ this.setShowFalseDiv(false); this.changeliSelect = res.cnName; this.$router.push(res.url); + this.$store.commit('currentPerms', res.perms); }, async getMenuTree() { - //鑾峰彇鐩綍鏍戞渶澶D锛屾柊寤鸿妭鐐逛娇鐢� - // queryMaxId().then((res) => { - // this.id = res.data; - // }); - // - const data = await queryMenuTree(); var that = this; if (data.code == 200) { -- Gitblit v1.9.3