提交 d8774a6e 编写于 作者: KK's avatar KK

修复分页导航视图偶发bug

上级 a63abf3a
...@@ -20,11 +20,6 @@ ...@@ -20,11 +20,6 @@
></app-mob-icon> ></app-mob-icon>
</#if> </#if>
${ctrl.render.code} ${ctrl.render.code}
<app-mob-button
v-if="!isTempMode && !allLoaded && needLoadMore"
class="loadmore_btn"
:text="$t('app.button.loadmore')"
@click="loadBottom" />
</template> </template>
</ion-list> </ion-list>
<ion-list class="items" ref="ionlist" <#if ctrl.getBatchPSDEToolbar?? && ctrl.getBatchPSDEToolbar()??>@touchmove="gotouchmove" @touchstart="gotouchstart" @touchend="gotouchend"</#if>> <ion-list class="items" ref="ionlist" <#if ctrl.getBatchPSDEToolbar?? && ctrl.getBatchPSDEToolbar()??>@touchmove="gotouchmove" @touchstart="gotouchstart" @touchend="gotouchend"</#if>>
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
<#assign tabexppanel = view.getPSControl('tabexppanel')> <#assign tabexppanel = view.getPSControl('tabexppanel')>
<#assign dename = tabexppanel.getPSAppDataEntity().getCodeName()?lower_case> <#assign dename = tabexppanel.getPSAppDataEntity().getCodeName()?lower_case>
<#assign created_block> <#assign created_block>
this.getLocalStorage(); this.getCacheTabkey();
</#assign> </#assign>
/** /**
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
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(value); this.setCacheTabkey(value);
} }
/** /**
...@@ -102,11 +102,9 @@ ...@@ -102,11 +102,9 @@
* @returns {void} * @returns {void}
* @memberof MOBORDERMobTabExpViewBase * @memberof MOBORDERMobTabExpViewBase
*/ */
public setLocalStorage(value:any) { public setCacheTabkey(value:any) {
let name:string = '${dename}'; const cacheTab:any = {name:'${dename}',id:this.context.${dename},value:value,viewtag: this.viewtag};
let id:any = this.context.${dename}; localStorage.setItem('tabKey',JSON.stringify(cacheTab));
let obj:any = {"name":name,"id":id,"value":value};
localStorage.setItem('tabKey',JSON.stringify(obj));
} }
/** /**
* localStorage取值 * localStorage取值
...@@ -115,12 +113,12 @@ ...@@ -115,12 +113,12 @@
* @returns {void} * @returns {void}
* @memberof MOBORDERMobTabExpViewBase * @memberof MOBORDERMobTabExpViewBase
*/ */
public getLocalStorage() { public getCacheTabkey() {
let key:any = localStorage.getItem('tabKey') const _cacheTabKey: any = localStorage.getItem('tabKey')
if(key){ if(_cacheTabKey){
let info:any = JSON.parse(key); let cacheTabKey:any = JSON.parse(_cacheTabKey);
if (info.name && info.name == '${dename}' && info.id && info.id == this.context.${dename}) { if (cacheTabKey.name && cacheTabKey.name == '${dename}' && cacheTabKey.id && cacheTabKey.id == this.context.${dename} && info.viewtag === this.viewtag) {
this.activiedTabViewPanel = info.value; this.activiedTabViewPanel = cacheTabKey.value;
} else { } else {
this.activiedTabViewPanel = '<#list tabexppanel.getPSControls() as tabviewpanel><#if tabviewpanel_index==0>${tabviewpanel.name}</#if></#list>'; this.activiedTabViewPanel = '<#list tabexppanel.getPSControls() as tabviewpanel><#if tabviewpanel_index==0>${tabviewpanel.name}</#if></#list>';
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册