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

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

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