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

TS强类型判断

上级 8440b295
...@@ -69,7 +69,9 @@ ...@@ -69,7 +69,9 @@
this.tabPanelClick(data.activeItem); this.tabPanelClick(data.activeItem);
} else { } else {
this.$nextTick(() => { this.$nextTick(() => {
this.viewState.next({ tag: this.activiedTabViewPanel, action: action, data: data }); if(this.activiedTabViewPanel){
this.viewState.next({ tag: this.activiedTabViewPanel, action: action, data: data });
}
}); });
} }
}); });
...@@ -115,7 +117,9 @@ ...@@ -115,7 +117,9 @@
} }
this.$emit("changepanel",$event); this.$emit("changepanel",$event);
this.$nextTick(() => { this.$nextTick(() => {
this.viewState.next({ tag: this.activiedTabViewPanel, action: this.action, data: {}}); if(this.activiedTabViewPanel){
this.viewState.next({ tag: this.activiedTabViewPanel, action: this.action, data: {}});
}
}); });
} }
......
...@@ -70,7 +70,9 @@ this.getLocalStorage(); ...@@ -70,7 +70,9 @@ this.getLocalStorage();
* @memberof MOBORDERMobTabExpViewBase * @memberof MOBORDERMobTabExpViewBase
*/ */
public getLocalStorage() { public getLocalStorage() {
if(localStorage.getItem('tabKey')){
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 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册