提交 680e4c73 编写于 作者: tony001's avatar tony001

zpc

上级 f04e7a21
...@@ -26,7 +26,7 @@ import view_${ctrl.getName()} from '@widgets/app/${srffilepath2(ctrl.getCodeName ...@@ -26,7 +26,7 @@ import view_${ctrl.getName()} from '@widgets/app/${srffilepath2(ctrl.getCodeName
beforeRouteEnter: (to: any, from: any, next: any) => { beforeRouteEnter: (to: any, from: any, next: any) => {
next((vm: any) => { next((vm: any) => {
if(!Object.is(vm.navModel,"route")){ if(!Object.is(vm.navModel,"route")){
vm.navDataService.addNavDataByOnly({id:'${srffilepath2(view.getCodeName())}',tag:vm.viewtag,srfkey:<#if appde??>vm.context.${appde.getCodeName()?lower_case}<#else>null</#if>,title:vm.$t(vm.model.srfTitle),data:data,context:vm.context,viewparams:vm.viewparams,path:vm.$route.fullPath}); vm.navDataService.addNavDataByOnly({id:'${srffilepath2(view.getCodeName())}',tag:vm.viewtag,srfkey:<#if appde??>vm.context.${appde.getCodeName()?lower_case}<#else>null</#if>,title:vm.$t(vm.model.srfTitle),data:null,context:vm.context,viewparams:vm.viewparams,path:vm.$route.fullPath});
} }
vm.$store.commit('addCurPageViewtag', { fullPath: to.fullPath, viewtag: vm.viewtag }); vm.$store.commit('addCurPageViewtag', { fullPath: to.fullPath, viewtag: vm.viewtag });
}); });
......
...@@ -50,9 +50,10 @@ ...@@ -50,9 +50,10 @@
* @memberof ${srfclassname('${view.name}')}Base * @memberof ${srfclassname('${view.name}')}Base
*/ */
public beforeCreate(){ public beforeCreate(){
if(!Object.is(this.navModel,"route")){ if(!Object.is(this.navModel,"route")){
let navDataService = NavDataService.getInstance(this.$store) let navDataService = NavDataService.getInstance(this.$store)
navDataService.removeAllNavData(); navDataService.removeAllNavData();
}
} }
/** /**
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册