Commit 3b2807c0 authored by 周远喜's avatar 周远喜

面包屑处理ok

parent ad3c1d76
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
/> />
</slot> </slot>
</div>&nbsp; </div>&nbsp;
<Button v-if="high" @click="modalSearch=true" type="success">高级搜索</Button> <a v-if="high" @click="modalSearch=true" style="line-height:35px;"><Icon type="md-search" />高级</a>
<div class="searchBack"> <div class="searchBack">
<slot name="searchBack"></slot> <slot name="searchBack"></slot>
</div> </div>
......
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
}, },
items () { items () {
let items = [...this.openNames]; let items = [...this.openNames];
console.log("items",items)
let newItems = []; let newItems = [];
items.forEach(i => { items.forEach(i => {
newItems.push(this.siderMenuObject[i]); newItems.push(this.siderMenuObject[i]);
...@@ -57,9 +58,11 @@ ...@@ -57,9 +58,11 @@
} }
}, },
data () { data () {
let menus=this.$store.state.admin.menu.sider;
return { return {
// 得到所有侧边菜单,并转为平级,查询图标及显示对应内容 // 得到所有侧边菜单,并转为平级,查询图标及显示对应内容
allSiderMenu: flattenSiderMenu(menuSider, []), // allSiderMenu: flattenSiderMenu(menuSider, []),
allSiderMenu: flattenSiderMenu(menus, []),
handleResize: () => {}, handleResize: () => {},
isLimit: false, isLimit: false,
maxWidth: 560, maxWidth: 560,
......
...@@ -55,13 +55,11 @@ export default { ...@@ -55,13 +55,11 @@ export default {
const openNames = getSiderSubmenu(path, menuSider); const openNames = getSiderSubmenu(path, menuSider);
this.$store.commit("admin/menu/setOpenNames", openNames); this.$store.commit("admin/menu/setOpenNames", openNames);
} }
}else{ } else {
let menus=this.$store.state.admin.menu.sider let menus = this.$store.state.admin.menu.sider;
console.warn(menus);
this.$store.commit("admin/menu/setActivePath", to.path); this.$store.commit("admin/menu/setActivePath", to.path);
const openNames = getSiderSubmenu(path, menus); const openNames = getSiderSubmenu(path, menus);
console.log("openNames",openNames,path) this.$store.commit("admin/menu/setOpenNames", openNames);
this.$store.commit("admin/menu/setOpenNames", openNames);
} }
// this.appRouteChange(to, from); // this.appRouteChange(to, from);
} }
...@@ -130,11 +128,11 @@ export default { ...@@ -130,11 +128,11 @@ export default {
if (name.charAt(name.length - 1) == "-") { if (name.charAt(name.length - 1) == "-") {
name = name.substr(0, name.length - 1); name = name.substr(0, name.length - 1);
} }
datas.meta={ datas.meta = {
auth:false, auth: false,
title:datas.title, title: datas.title,
closable:true closable: true
} };
datas.name = name; datas.name = name;
if (datas.children != null) { if (datas.children != null) {
this.toMenu(datas.children); this.toMenu(datas.children);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment