Commit a97c9aa3 by 张杰

增加对外公共方法

1 parent 211b5562
......@@ -77,7 +77,26 @@ export const Common = {
if (m) {
arr.push({ name: m.label, path: m.origin.frontRoute })
}
// 控制菜单展开
list.map(k => {
console.log(k.label +'---'+ o.label)
if (k.label == o.label) {
k.showSubList = true
} else {
k.showSubList = false;
}
(k.children || []).map(j => {
if (j.origin.frontRoute == m.origin.frontRoute) {
j.subItemActive = true
} else {
j.subItemActive = false;
}
})
})
store.dispatch("menu/setBreadCrumb", arr);
store.commit('menu/SET_MENU_LIST', list)
}
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!