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

分页部件逻辑调整

上级 e0b38888
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
${ctrl.render.code} ${ctrl.render.code}
<#else> <#else>
<div class = "drtab<#if ctrl.getPSSysCss?? && ctrl.getPSSysCss()??><#assign singleCss = ctrl.getPSSysCss()> ${singleCss.getCssName()}</#if>"> <div class = "drtab<#if ctrl.getPSSysCss?? && ctrl.getPSSysCss()??><#assign singleCss = ctrl.getPSSysCss()> ${singleCss.getCssName()}</#if>">
<ion-tabs :animated='false' class='app-dr-tab' name='${ctrl.getCodeName()?lower_case}' @on-click="tabPanelClick"> <ion-tabs :animated='false' class='app-dr-tab' name='${ctrl.getCodeName()?lower_case}' @ionTabsDidChange="tabPanelClick($event)>
<ion-tab-bar slot="top"> <ion-tab-bar slot="top">
<#list ctrl.getRootItem().getAllItems() as dritem> <#list ctrl.getRootItem().getAllItems() as dritem>
<ion-tab-button <#if dritem_index == 0>v-if="isShowSlot"</#if> :index='${dritem_index?c}' name='${dritem.getId()?lower_case}' tab='${dritem.getId()?lower_case}' class='' :disabled='items[${dritem_index?c}].disabled' > <ion-tab-button <#if dritem_index == 0>v-if="isShowSlot"</#if> :index='${dritem_index?c}' name='${dritem.getId()?lower_case}' tab='${dritem.getId()?lower_case}' class='' :disabled='items[${dritem_index?c}].disabled' >
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<#else> <#else>
<ion-tab tab="${dritem.getId()?lower_case}"> <ion-tab tab="${dritem.getId()?lower_case}">
<component <component
v-if="Object.is(this.selection.id, '${dritem.getId()?lower_case}') && this.selection.view && !Object.is(this.selection.view.viewname, '')" v-if="this.selection && Object.is(this.selection.id, '${dritem.getId()?lower_case}') && this.selection.view && !Object.is(this.selection.view.viewname, '')"
:is="selection.view.viewname" :is="selection.view.viewname"
class="viewcontainer2" class="viewcontainer2"
:viewdata="JSON.stringify(selection.data)" :viewdata="JSON.stringify(selection.data)"
......
...@@ -120,7 +120,7 @@ ...@@ -120,7 +120,7 @@
*/ */
public mounted(){ public mounted(){
if(this.items.length>0){ if(this.items.length>0){
this.isShowSlot?this.tabPanelClick(this.items[0].name):this.items.length>1?this.tabPanelClick(this.items[1].name):()=>{}; this.isShowSlot?this.tabPanelClick({detail:{tab:this.items[0].name}}):this.items.length>1?this.tabPanelClick({detail:{tab:this.items[1].name}}):()=>{};
} }
} }
...@@ -216,12 +216,12 @@ ...@@ -216,12 +216,12 @@
* 获取数据项 * 获取数据项
* *
* @public * @public
* @param {string} id * @param {any} item
* @returns {*} * @returns {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public getItem(id: string): any { public getItem(item: any): any {
const arr: any[] = this.items.filter((_item: any) => Object.is(_item.id, id)); const arr: any[] = this.items.filter((_item: any) => Object.is(_item.id, item.detail.tab));
if (arr) { if (arr) {
return arr[0]; return arr[0];
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册