From 6f978b9dfad80e3805874dcfc2d91659f6de7e8f Mon Sep 17 00:00:00 2001 From: Caps <452713115@qq.com> Date: Mon, 13 Apr 2020 16:05:27 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B4=A6=E6=88=B7=E7=99=BB=E9=99=86=E6=9D=83?= =?UTF-8?q?=E9=99=90=E6=8E=A7=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/Home.vue | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/src/pages/Home.vue b/src/pages/Home.vue index 132d995..94b4c02 100644 --- a/src/pages/Home.vue +++ b/src/pages/Home.vue @@ -191,18 +191,6 @@ let row = data[i]; that.threePermissionList.push(row); } - - //选中第一个权限 - if (data && data.length > 0 && that.refreshFlag) { - let resource = ''; - if (that.threePermissionList[0].resource) { - resource = that.threePermissionList[0].resource; - } - that.subMenuClick(0); - that.$router.push({path: resource}); - //刷新标识 - that.refreshFlag = false; - } that.twoPermissionList.forEach(function (two) { //把三级导航绑定给第二级导航栏 let three = that.threePermissionList.filter(function (data) { @@ -226,20 +214,15 @@ menuInit: function () { let that = this; that.selectedItemName = that.onePermissionList[0].subMenuList[0].id; - that.openName = "['1']"; + that.openName = [that.onePermissionList[0].id]; this.$nextTick(()=>{ this.$refs.menu.updateOpened(); this.$refs.menu.updateActiveName(); }) - debugger + this.selectedMenu = this.onePermissionList[0].name; + this.selectedSubMenu = this.onePermissionList[0].subMenuList[0].name; this.$router.push({path:that.onePermissionList[0].subMenuList[0].resource}); }, - //左侧二级权限展开-传入二级权限id - subMenuUnfold: function (twoPermissionId) { - }, - //左侧三级权限点击-传入三级权限下标 - subMenuClick: function (index) { - }, } }