UNPKG

@zoff-tech/zt-bottom-drawer

Version:
2 lines 1.06 kB
import{r as t,h as e,H as i,e as s}from"./p-f6c816ce.js";import{attachComponent as a}from"@utils/framework-delegate";const n=":host(.tab-hidden){display:none !important}";const r=class{constructor(e){t(this,e);this.loaded=false;this.active=false;this.delegate=undefined;this.tab=undefined;this.component=undefined}async componentWillLoad(){if(this.active){await this.setActive()}}async setActive(){await this.prepareLazyLoaded();this.active=true}changeActive(t){if(t){this.prepareLazyLoaded()}}prepareLazyLoaded(){if(!this.loaded&&this.component!=null){this.loaded=true;try{return a(this.delegate,this.el,this.component,["ion-page"])}catch(t){console.error(t)}}return Promise.resolve(undefined)}render(){const{tab:t,active:s,component:a}=this;return e(i,{role:"tabpanel","aria-hidden":!s?"true":null,"aria-labelledby":`tab-button-${t}`,class:{"ion-page":a===undefined,"tab-hidden":!s}},e("slot",null))}get el(){return s(this)}static get watchers(){return{active:["changeActive"]}}};r.style=n;export{r as ion_tab}; //# sourceMappingURL=p-8224a637.entry.js.map