提交 6b6ce920 编写于 作者: tony001's avatar tony001

调整tab分页模式导航

上级 908dbcbd
......@@ -487,8 +487,6 @@ import NavDataService from '@/service/app/navdata-service';
let navDataService = NavDataService.getInstance(this.$store);
if(Object.is(this.navModel,"route")){
navDataService.removeNavData(this.viewtag);
}else{
navDataService.removeNavDataWithoutCache(this.viewtag);
}
switch (item.appfunctag) {
<#if ctrl.getPSAppFuncs()??>
......
......@@ -228,7 +228,11 @@
*/
public initNavData(data:any = null){
if(this.viewDefaultUsage){
this.navDataService.addNavData({id:'${srffilepath2(view.getCodeName())}',tag:this.viewtag,srfkey:<#if appde??>this.context.${appde.getCodeName()?lower_case}<#else>null</#if>,title:this.$t(this.model.srfTitle),data:data,context:this.context,viewparams:this.viewparams,path:this.$route.fullPath});
if(Object.is(this.navModel,"route")){
this.navDataService.addNavData({id:'${srffilepath2(view.getCodeName())}',tag:this.viewtag,srfkey:<#if appde??>this.context.${appde.getCodeName()?lower_case}<#else>null</#if>,title:this.$t(this.model.srfTitle),data:data,context:this.context,viewparams:this.viewparams,path:this.$route.fullPath});
}else{
this.navDataService.addNavDataByOnly({id:'${srffilepath2(view.getCodeName())}',tag:this.viewtag,srfkey:<#if appde??>this.context.${appde.getCodeName()?lower_case}<#else>null</#if>,title:this.$t(this.model.srfTitle),data:data,context:this.context,viewparams:this.viewparams,path:this.$route.fullPath});
}
}
}
......
<script lang='tsx'>
import { Vue, Component, Prop, Provide, Emit, Watch } from 'vue-property-decorator';
import { Vue, Component, Prop, Provide, Emit, Watch,Inject } from 'vue-property-decorator';
import { UIActionTool,Util } from '@/utils';
import NavDataService from '@/service/app/navdata-service';
<#if view.getPSAppCounterRefs()??>
......@@ -124,6 +124,15 @@ export default class ${srfclassname('${view.name}')}Base extends Vue {
*/
@Prop({ default: true }) public viewDefaultUsage!: boolean;
/**
* 视图默认使用
*
* @type {string}
* @memberof ${srfclassname('${view.name}')}Base
*/
@Inject('navModel')
public navModel!:string;
/**
* 视图标识
*
......
......@@ -33,6 +33,7 @@
* @type {string}
* @memberof ${srfclassname('${view.name}')}Base
*/
@Provide()
public navModel:string = "<#if view.getViewStyle() == "DEFAULT">tab<#else>route</#if>";
/**
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册