提交 62daffc6 编写于 作者: zhujiamin's avatar zhujiamin

debug3 分页导航视图分页跳转时返回应缓存之前tab

上级 bb641b1a
......@@ -36,7 +36,7 @@ this.getLocalStorage();
return;
}
this.viewState.next({ tag: '${tabexppanel.name}', action: 'active', data: { activeItem: value } });
this.setLocalStorage();
this.setLocalStorage(value);
}
/**
......@@ -46,7 +46,7 @@ this.getLocalStorage();
* @returns {void}
* @memberof MOBORDERMobTabExpViewBase
*/
protected changePanel(res) : void {
protected changePanel(res:any) : void {
this.activiedTabViewPanel = res;
}
/**
......@@ -56,9 +56,9 @@ this.getLocalStorage();
* @returns {void}
* @memberof MOBORDERMobTabExpViewBase
*/
public setLocalStorage() {
let name:string = ${dename};
let id:string = this.context.${dename};
public setLocalStorage(value:any) {
let name:string = '${dename}';
let id:any = this.context.${dename};
let obj:any = {"name":name,"id":id,"value":value};
localStorage.setItem('tabKey',JSON.stringify(obj));
}
......@@ -71,7 +71,7 @@ this.getLocalStorage();
*/
public getLocalStorage() {
let info:any = JSON.parse(localStorage.getItem('tabKey'));
if (info.name == ${dename}) {
if (info.name == '${dename}') {
if (info.id == this.context.${dename}) {
this.activiedTabViewPanel = info.value;
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册