提交 45d0f7ad 编写于 作者: tony001's avatar tony001

调整视图标题问题

上级 38792400
...@@ -193,19 +193,19 @@ export default class EditViewEngine extends ViewEngine { ...@@ -193,19 +193,19 @@ export default class EditViewEngine extends ViewEngine {
*/ */
public setTabCaption(info: string,isNew:boolean): void { public setTabCaption(info: string,isNew:boolean): void {
let viewdata: any = this.view.model; let viewdata: any = this.view.model;
let index:number = viewdata.srfTitle.indexOf("-"); let index:number = viewdata.srfCaption.indexOf("-");
if (viewdata && info && !Object.is(info, '')) { if (viewdata && info && !Object.is(info, '')) {
if(index !== -1){ if(index !== -1){
viewdata.srfTitle = viewdata.srfTitle.substr(0,index); viewdata.srfCaption = viewdata.srfCaption.substr(0,index);
} }
// 解决表格视图标题问题 // 解决表格视图标题问题
if(this.view.$tabPageExp && this.view.viewDefaultUsage){ if(this.view.$tabPageExp && this.view.viewDefaultUsage){
this.view.$tabPageExp.setCurPageCaption(this.view.$t(viewdata.srfTitle), this.view.$t(viewdata.srfTitle), info); this.view.$tabPageExp.setCurPageCaption(this.view.$t(viewdata.srfCaption), this.view.$t(viewdata.srfCaption), info);
} }
if(this.view.$route){ if(this.view.$route){
this.view.$route.meta.info = info; this.view.$route.meta.info = info;
} }
this.view.model.srfTitle = `${this.view.$t(viewdata.srfTitle)}-${viewdata.dataInfo}`; this.view.model.srfCaption = `${this.view.$t(viewdata.srfCaption)}-${viewdata.dataInfo}`;
this.view.initNavDataWithRoute(null,isNew); this.view.initNavDataWithRoute(null,isNew);
} }
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册