Commit c7da60a5 by 冒粤蓉

fix

1 parent 3760ec89
......@@ -209,12 +209,10 @@ export default {
// 初始化操作
let showEmpty = false;
// 同步激活样式
if(curBreadcrumb) {
curBreadcrumb = JSON.parse(curBreadcrumb);
}
// 同步激活样式
resData.forEach((item) => {
if(curBreadcrumb) {
resData.forEach((item) => {
const { menuName: pMenuName } = item.origin;
item.showSubList = pMenuName === curBreadcrumb[0].name;
item.children.forEach((cItem, cIndex) => {
......@@ -224,14 +222,14 @@ export default {
curBreadcrumb[1].id = cItem.id;
}
})
}
});
});
}
if(isInit && curBreadcrumb) {
let thisBread = curBreadcrumb[curBreadcrumb.length - 1];
let path = thisBread.path || '/noData';
let name = thisBread.name || '';
let id = thisBread.id || '';
let id = thisBread.id || '';
if(!path || path == '/noData') {
showEmpty = true;
};
......@@ -255,7 +253,9 @@ export default {
if(!cOrigin.frontRoute || cOrigin.frontRoute == '/noData') {
showEmpty = true;
};
name && getMenuAuth(firstList.children[0].id, cOrigin.menuName);
firstList.showSubList = true;
firstList.children[0].subItemActive = true;
cOrigin.menuName && getMenuAuth(firstList.children[0].id, cOrigin.menuName);
history.pushState({breadcrumb}, cOrigin.frontRoute, cOrigin.frontRoute);
store.dispatch('app/setCommonData', { showEmpty });
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!