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

修复分页导航视图偶发bug

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