diff --git a/src/layout/components/Sidebar/index.vue b/src/layout/components/Sidebar/index.vue index 2110774..190c540 100644 --- a/src/layout/components/Sidebar/index.vue +++ b/src/layout/components/Sidebar/index.vue @@ -33,11 +33,12 @@ export default { components: { SidebarItem, Logo }, created: function () { this.getmunusdata(); - this.menusdatas = 66 + //this.menusdatas = '' + var fe = 10; }, data() { return { - //routes:this.menusdatas + routes:menusdata } }, computed: { @@ -88,10 +89,10 @@ export default { } arrMenus.push(newMenu); - console.log(arrMenus); - return arrMenus; + //console.log(arrMenus); + }); - + return arrMenus; }, getmunusdata() { @@ -104,8 +105,9 @@ export default { //routesData(datamain.data.menus); //console.log(response); console.log(this.menusdatas); - this.menusdatas = this.SplicingMenuTree(datamain.data.menus); - console.log(this.menusdatas); + menusdata[0].children = this.SplicingMenuTree(datamain.data.menus); + //menusdatas[0] = addmunst + console.log(menusdata); //this.routes = menusdata //console.log(menusdata); diff --git a/src/layout/components/Sidebar/leftMenusData.js b/src/layout/components/Sidebar/leftMenusData.js index 6ef64c4..6cc4e6b 100644 --- a/src/layout/components/Sidebar/leftMenusData.js +++ b/src/layout/components/Sidebar/leftMenusData.js @@ -31,6 +31,7 @@ var menusdata = [ id: '0', path: '/filemange', meta: { title: '文件管理', icon: 'dashboard' }, + children:[] }, { path: '/usermange',