提交 9f60fb75 编写于 作者: tony001's avatar tony001

调整

上级 0e70717f
...@@ -375,7 +375,7 @@ export default class MDViewEngine extends ViewEngine { ...@@ -375,7 +375,7 @@ export default class MDViewEngine extends ViewEngine {
} }
this.view.viewCacheData = cacheArray; this.view.viewCacheData = cacheArray;
this.view.initNavDataWithRoute(cacheArray); this.view.initNavDataWithRoute(cacheArray);
this.view.initNavDataWithTab(cacheArray); this.view.initNavDataWithTab(cacheArray,false);
if (this.view) { if (this.view) {
this.view.$emit('viewload', args); this.view.$emit('viewload', args);
} }
......
...@@ -318,18 +318,22 @@ export default class NavDataService { ...@@ -318,18 +318,22 @@ export default class NavDataService {
* *
* @memberof NavDataService * @memberof NavDataService
*/ */
public addNavDataByOnly(curNavData:NavDataElement){ public addNavDataByOnly(curNavData:NavDataElement,isOnlyAdd:boolean){
if(this.navDataStack.length >0){ if(isOnlyAdd){
let tempIndex:number = this.navDataStack.findIndex((element:NavDataElement) =>{ this.navDataStack.push(curNavData);
return Object.is(element.tag,curNavData.tag); }else{
}) if(this.navDataStack.length >0){
if(tempIndex === -1){ let tempIndex:number = this.navDataStack.findIndex((element:NavDataElement) =>{
this.navDataStack.push(curNavData); return Object.is(element.tag,curNavData.tag);
})
if(tempIndex === -1){
this.navDataStack.push(curNavData);
}else{
this.navDataStack[tempIndex] = curNavData;
}
}else{ }else{
this.navDataStack[tempIndex] = curNavData; this.navDataStack.push(curNavData);
} }
}else{
this.navDataStack.push(curNavData);
} }
this.sessionStore.setItem('srfnavdata',JSON.stringify(this.navDataStack)); this.sessionStore.setItem('srfnavdata',JSON.stringify(this.navDataStack));
return curNavData; return curNavData;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册