diff --git a/src/views/layout/Layout.vue b/src/views/layout/Layout.vue index a5672de..68ca52c 100644 --- a/src/views/layout/Layout.vue +++ b/src/views/layout/Layout.vue @@ -27,7 +27,7 @@ export default { watch: { '$route.path'() { setTimeout(() => { - this.showBtn() + this.getPerList() },500) } }, @@ -78,13 +78,12 @@ export default { relation: false, reset: false, } + console.log('list: ', list); for(var i = 0; i < perList.length; i++) { if(perList[i][1] === code) { + console.log('perList[i]: ', perList[i]); list[perList[i][2]] = true; } - // if(perList[i][2] === 'reset') { - // console.log('perList[i]: ', perList[i]); - // } } this.setShowBtnList(list) }, diff --git a/src/views/layout/components/Sidebar/SidebarItem.vue b/src/views/layout/components/Sidebar/SidebarItem.vue index 06d17e5..806feb9 100644 --- a/src/views/layout/components/Sidebar/SidebarItem.vue +++ b/src/views/layout/components/Sidebar/SidebarItem.vue @@ -13,7 +13,8 @@ @@ -102,6 +103,7 @@ export default { return path.resolve(this.basePath, routePath) }, storageCode(code){ + console.log('code: ', code); localStorage.setItem('code', code) }, // 判断当前菜单是否显示