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

面包屑处理ok

parent ad3c1d76
......@@ -12,7 +12,7 @@
/>
</slot>
</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">
<slot name="searchBack"></slot>
</div>
......
......@@ -45,6 +45,7 @@
},
items () {
let items = [...this.openNames];
console.log("items",items)
let newItems = [];
items.forEach(i => {
newItems.push(this.siderMenuObject[i]);
......@@ -57,9 +58,11 @@
}
},
data () {
let menus=this.$store.state.admin.menu.sider;
return {
// 得到所有侧边菜单,并转为平级,查询图标及显示对应内容
allSiderMenu: flattenSiderMenu(menuSider, []),
// allSiderMenu: flattenSiderMenu(menuSider, []),
allSiderMenu: flattenSiderMenu(menus, []),
handleResize: () => {},
isLimit: false,
maxWidth: 560,
......
......@@ -55,13 +55,11 @@ export default {
const openNames = getSiderSubmenu(path, menuSider);
this.$store.commit("admin/menu/setOpenNames", openNames);
}
}else{
let menus=this.$store.state.admin.menu.sider
console.warn(menus);
} else {
let menus = this.$store.state.admin.menu.sider;
this.$store.commit("admin/menu/setActivePath", to.path);
const openNames = getSiderSubmenu(path, menus);
console.log("openNames",openNames,path)
this.$store.commit("admin/menu/setOpenNames", openNames);
const openNames = getSiderSubmenu(path, menus);
this.$store.commit("admin/menu/setOpenNames", openNames);
}
// this.appRouteChange(to, from);
}
......@@ -130,11 +128,11 @@ export default {
if (name.charAt(name.length - 1) == "-") {
name = name.substr(0, name.length - 1);
}
datas.meta={
auth:false,
title:datas.title,
closable:true
}
datas.meta = {
auth: false,
title: datas.title,
closable: true
};
datas.name = name;
if (datas.children != null) {
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