diff --git a/src/assets/logo1.png b/src/assets/logo1.png new file mode 100644 index 0000000..2af0362 Binary files /dev/null and b/src/assets/logo1.png differ diff --git a/src/assets/navbar-bkg.png b/src/assets/navbar-bkg.png new file mode 100644 index 0000000..ce25313 Binary files /dev/null and b/src/assets/navbar-bkg.png differ diff --git a/src/layout/components/AppMain.vue b/src/layout/components/AppMain.vue index ab6ee89..bf274d4 100644 --- a/src/layout/components/AppMain.vue +++ b/src/layout/components/AppMain.vue @@ -19,16 +19,28 @@ export default { } + diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index 93b3ccd..0d74073 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -1,140 +1,201 @@ - - - - - diff --git a/src/layout/components/Sidebar/Item.vue b/src/layout/components/Sidebar/Item.vue index 9fed7c6..fcbf376 100644 --- a/src/layout/components/Sidebar/Item.vue +++ b/src/layout/components/Sidebar/Item.vue @@ -3,6 +3,10 @@ export default { name: 'MenuItem', functional: true, props: { + pid: { + type: Number, + default: 0 + }, icon: { type: String, default: '' @@ -13,32 +17,36 @@ export default { } }, render(h, context) { - const { icon, title } = context.props + const { icon, title, pid } = context.props const vnodes = [] - - if (icon) { - if (icon.includes('el-icon')) { - vnodes.push() - } - else if(icon.includes("viewicon")){ + //解决el-menu-item 中行内样式padding-left为动态计算问题 + vnodes.push( ) + if (pid === 0) { + if (icon) { + if (icon.includes('el-icon')) { + vnodes.push() + } + else if(icon.includes("viewicon")){ let _icon=icon.split("/")[1]; vnodes.push() - } - else if(icon.includes("iconfont")){ + } + else if(icon.includes("iconfont")){ let _icon=icon.split("/")[1]; vnodes.push() - } - else { - vnodes.push() - } - }else { + } + else { + vnodes.push() + } + }else { var _icon="el-icon-menu"; vnodes.push() } + } if (title) { vnodes.push({(title)}) } + return vnodes } } diff --git a/src/layout/components/Sidebar/SidebarItem.vue b/src/layout/components/Sidebar/SidebarItem.vue index e580e5e..276e788 100644 --- a/src/layout/components/Sidebar/SidebarItem.vue +++ b/src/layout/components/Sidebar/SidebarItem.vue @@ -4,14 +4,14 @@ v-if="hasOneShowingChild(item.children,item) && (!onlyOneChild.children||onlyOneChild.noShowingChildren)&&!item.alwaysShow"> - + @@ -94,11 +94,9 @@ } return path.resolve(this.basePath, routePath) } - } + }, } - diff --git a/src/layout/components/Sidebar/index.vue b/src/layout/components/Sidebar/index.vue index fb014a2..9dfa280 100644 --- a/src/layout/components/Sidebar/index.vue +++ b/src/layout/components/Sidebar/index.vue @@ -1,7 +1,9 @@