1 |
- {"ast":null,"code":"import _asyncToGenerator from \"F:/workspace/202226701027/huinongbao-app/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\";\n/*!\n * (C) Ionic http://ionicframework.com - MIT License\n */\nimport { proxyCustomElement, HTMLElement, Build, h, Host } from '@stencil/core/internal/client';\nimport { a as attachComponent } from './framework-delegate.js';\nconst tabCss = \":host(.tab-hidden){display:none !important}\";\nconst IonTabStyle0 = tabCss;\nconst Tab = /*@__PURE__*/proxyCustomElement(class Tab extends HTMLElement {\n constructor() {\n super();\n this.__registerHost();\n this.__attachShadow();\n this.loaded = false;\n this.active = false;\n this.delegate = undefined;\n this.tab = undefined;\n this.component = undefined;\n }\n componentWillLoad() {\n var _this = this;\n return _asyncToGenerator(function* () {\n if (Build.isDev) {\n if (_this.component !== undefined && _this.el.childElementCount > 0) {\n console.error('You can not use a lazy-loaded component in a tab and inlined content at the same time.' + `- Remove the component attribute in: <ion-tab component=\"${_this.component}\">` + ` or` + `- Remove the embedded content inside the ion-tab: <ion-tab></ion-tab>`);\n }\n }\n if (_this.active) {\n yield _this.setActive();\n }\n })();\n }\n /** Set the active component for the tab */\n setActive() {\n var _this2 = this;\n return _asyncToGenerator(function* () {\n yield _this2.prepareLazyLoaded();\n _this2.active = true;\n })();\n }\n changeActive(isActive) {\n if (isActive) {\n this.prepareLazyLoaded();\n }\n }\n prepareLazyLoaded() {\n if (!this.loaded && this.component != null) {\n this.loaded = true;\n try {\n return attachComponent(this.delegate, this.el, this.component, ['ion-page']);\n } catch (e) {\n console.error(e);\n }\n }\n return Promise.resolve(undefined);\n }\n render() {\n const {\n tab,\n active,\n component\n } = this;\n return h(Host, {\n key: 'cb75d0877979b3b8df8f7e1952bfa9677da1eaa5',\n role: \"tabpanel\",\n \"aria-hidden\": !active ? 'true' : null,\n \"aria-labelledby\": `tab-button-${tab}`,\n class: {\n 'ion-page': component === undefined,\n 'tab-hidden': !active\n }\n }, h(\"slot\", {\n key: '37fbb7b7a6b03eb93b1dacd2dc1025b78eb2aa6b'\n }));\n }\n get el() {\n return this;\n }\n static get watchers() {\n return {\n \"active\": [\"changeActive\"]\n };\n }\n static get style() {\n return IonTabStyle0;\n }\n}, [1, \"ion-tab\", {\n \"active\": [1028],\n \"delegate\": [16],\n \"tab\": [1],\n \"component\": [1],\n \"setActive\": [64]\n}, undefined, {\n \"active\": [\"changeActive\"]\n}]);\nfunction defineCustomElement$1() {\n if (typeof customElements === \"undefined\") {\n return;\n }\n const components = [\"ion-tab\"];\n components.forEach(tagName => {\n switch (tagName) {\n case \"ion-tab\":\n if (!customElements.get(tagName)) {\n customElements.define(tagName, Tab);\n }\n break;\n }\n });\n}\nconst IonTab = Tab;\nconst defineCustomElement = defineCustomElement$1;\nexport { IonTab, defineCustomElement };","map":{"version":3,"names":["proxyCustomElement","HTMLElement","Build","h","Host","a","attachComponent","tabCss","IonTabStyle0","Tab","constructor","__registerHost","__attachShadow","loaded","active","delegate","undefined","tab","component","componentWillLoad","_this","_asyncToGenerator","isDev","el","childElementCount","console","error","setActive","_this2","prepareLazyLoaded","changeActive","isActive","e","Promise","resolve","render","key","role","class","watchers","style","defineCustomElement$1","customElements","components","forEach","tagName","get","define","IonTab","defineCustomElement"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@ionic/core/components/ion-tab.js"],"sourcesContent":["/*!\n * (C) Ionic http://ionicframework.com - MIT License\n */\nimport { proxyCustomElement, HTMLElement, Build, h, Host } from '@stencil/core/internal/client';\nimport { a as attachComponent } from './framework-delegate.js';\n\nconst tabCss = \":host(.tab-hidden){display:none !important}\";\nconst IonTabStyle0 = tabCss;\n\nconst Tab = /*@__PURE__*/ proxyCustomElement(class Tab extends HTMLElement {\n constructor() {\n super();\n this.__registerHost();\n this.__attachShadow();\n this.loaded = false;\n this.active = false;\n this.delegate = undefined;\n this.tab = undefined;\n this.component = undefined;\n }\n async componentWillLoad() {\n if (Build.isDev) {\n if (this.component !== undefined && this.el.childElementCount > 0) {\n console.error('You can not use a lazy-loaded component in a tab and inlined content at the same time.' +\n `- Remove the component attribute in: <ion-tab component=\"${this.component}\">` +\n ` or` +\n `- Remove the embedded content inside the ion-tab: <ion-tab></ion-tab>`);\n }\n }\n if (this.active) {\n await this.setActive();\n }\n }\n /** Set the active component for the tab */\n async setActive() {\n await this.prepareLazyLoaded();\n this.active = true;\n }\n changeActive(isActive) {\n if (isActive) {\n this.prepareLazyLoaded();\n }\n }\n prepareLazyLoaded() {\n if (!this.loaded && this.component != null) {\n this.loaded = true;\n try {\n return attachComponent(this.delegate, this.el, this.component, ['ion-page']);\n }\n catch (e) {\n console.error(e);\n }\n }\n return Promise.resolve(undefined);\n }\n render() {\n const { tab, active, component } = this;\n return (h(Host, { key: 'cb75d0877979b3b8df8f7e1952bfa9677da1eaa5', role: \"tabpanel\", \"aria-hidden\": !active ? 'true' : null, \"aria-labelledby\": `tab-button-${tab}`, class: {\n 'ion-page': component === undefined,\n 'tab-hidden': !active,\n } }, h(\"slot\", { key: '37fbb7b7a6b03eb93b1dacd2dc1025b78eb2aa6b' })));\n }\n get el() { return this; }\n static get watchers() { return {\n \"active\": [\"changeActive\"]\n }; }\n static get style() { return IonTabStyle0; }\n}, [1, \"ion-tab\", {\n \"active\": [1028],\n \"delegate\": [16],\n \"tab\": [1],\n \"component\": [1],\n \"setActive\": [64]\n }, undefined, {\n \"active\": [\"changeActive\"]\n }]);\nfunction defineCustomElement$1() {\n if (typeof customElements === \"undefined\") {\n return;\n }\n const components = [\"ion-tab\"];\n components.forEach(tagName => { switch (tagName) {\n case \"ion-tab\":\n if (!customElements.get(tagName)) {\n customElements.define(tagName, Tab);\n }\n break;\n } });\n}\n\nconst IonTab = Tab;\nconst defineCustomElement = defineCustomElement$1;\n\nexport { IonTab, defineCustomElement };\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,kBAAkB,EAAEC,WAAW,EAAEC,KAAK,EAAEC,CAAC,EAAEC,IAAI,QAAQ,+BAA+B;AAC/F,SAASC,CAAC,IAAIC,eAAe,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