提交 14e6855a 编写于 作者: tony001's avatar tony001

全局导航路由模式调整 --- fix4

上级 9798d2d5
...@@ -31,7 +31,7 @@ export default class Breadcrumb extends Vue { ...@@ -31,7 +31,7 @@ export default class Breadcrumb extends Vue {
* *
* @memberof Breadcrumb * @memberof Breadcrumb
*/ */
private navDataService = NavDataService.getInstance({store:this.$store}); private navDataService = NavDataService.getInstance(this.$store);
/** /**
* 默认视图标识 * 默认视图标识
......
...@@ -89,7 +89,7 @@ export default class NavDataService { ...@@ -89,7 +89,7 @@ export default class NavDataService {
* @type {(any)} * @type {(any)}
* @memberof NavDataService * @memberof NavDataService
*/ */
private store: any; private static store: any;
/** /**
* 服务状态 * 服务状态
...@@ -133,7 +133,7 @@ export default class NavDataService { ...@@ -133,7 +133,7 @@ export default class NavDataService {
if (!NavDataService.navDataService) { if (!NavDataService.navDataService) {
NavDataService.navDataService = new NavDataService(); NavDataService.navDataService = new NavDataService();
} }
this.navDataService.store = store; this.store = store;
return this.navDataService; return this.navDataService;
} }
...@@ -202,6 +202,11 @@ export default class NavDataService { ...@@ -202,6 +202,11 @@ export default class NavDataService {
return Object.is(element.id,id); return Object.is(element.id,id);
}) })
let removeNavData = this.navDataStack.splice(tempIndex+1); let removeNavData = this.navDataStack.splice(tempIndex+1);
if(removeNavData && removeNavData.length >0){
removeNavData.forEach((navData:any) =>{
NavDataService.store.commit("deletePage", navData.path);
})
}
this.sessionStore.setItem('srfnavdata',JSON.stringify(this.navDataStack)); this.sessionStore.setItem('srfnavdata',JSON.stringify(this.navDataStack));
return removeNavData; return removeNavData;
}else{ }else{
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册