Commit c7da60a5 by 冒粤蓉

fix

1 parent 3760ec89
...@@ -209,12 +209,10 @@ export default { ...@@ -209,12 +209,10 @@ export default {
// 初始化操作 // 初始化操作
let showEmpty = false; let showEmpty = false;
// 同步激活样式
if(curBreadcrumb) { if(curBreadcrumb) {
curBreadcrumb = JSON.parse(curBreadcrumb); curBreadcrumb = JSON.parse(curBreadcrumb);
} resData.forEach((item) => {
// 同步激活样式
resData.forEach((item) => {
if(curBreadcrumb) {
const { menuName: pMenuName } = item.origin; const { menuName: pMenuName } = item.origin;
item.showSubList = pMenuName === curBreadcrumb[0].name; item.showSubList = pMenuName === curBreadcrumb[0].name;
item.children.forEach((cItem, cIndex) => { item.children.forEach((cItem, cIndex) => {
...@@ -224,14 +222,14 @@ export default { ...@@ -224,14 +222,14 @@ export default {
curBreadcrumb[1].id = cItem.id; curBreadcrumb[1].id = cItem.id;
} }
}) })
} });
}); }
if(isInit && curBreadcrumb) { if(isInit && curBreadcrumb) {
let thisBread = curBreadcrumb[curBreadcrumb.length - 1]; let thisBread = curBreadcrumb[curBreadcrumb.length - 1];
let path = thisBread.path || '/noData'; let path = thisBread.path || '/noData';
let name = thisBread.name || ''; let name = thisBread.name || '';
let id = thisBread.id || ''; let id = thisBread.id || '';
if(!path || path == '/noData') { if(!path || path == '/noData') {
showEmpty = true; showEmpty = true;
}; };
...@@ -255,7 +253,9 @@ export default { ...@@ -255,7 +253,9 @@ export default {
if(!cOrigin.frontRoute || cOrigin.frontRoute == '/noData') { if(!cOrigin.frontRoute || cOrigin.frontRoute == '/noData') {
showEmpty = true; 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); history.pushState({breadcrumb}, cOrigin.frontRoute, cOrigin.frontRoute);
store.dispatch('app/setCommonData', { showEmpty }); 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!