mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-09 16:16:41 +08:00
feat(custom-elements): add experimental custom elements build (#22863)
Co-authored-by: Liam DeBeasi <liamdebeasi@icloud.com>
This commit is contained in:
@ -3,7 +3,7 @@ import { Component, ComponentInterface, Element, Event, EventEmitter, Host, Meth
|
||||
import { getIonMode } from '../../global/ionic-global';
|
||||
import { Animation, Gesture, GestureDetail, RefresherEventDetail } from '../../interface';
|
||||
import { getTimeGivenProgression } from '../../utils/animation/cubic-bezier';
|
||||
import { clamp, getElementRoot, raf } from '../../utils/helpers';
|
||||
import { clamp, componentOnReady, getElementRoot, raf } from '../../utils/helpers';
|
||||
import { hapticImpact } from '../../utils/native/haptic';
|
||||
|
||||
import { createPullingAnimation, createSnapBackAnimation, getRefresherAnimationType, handleScrollWhilePulling, handleScrollWhileRefreshing, setSpinnerOpacity, shouldUseNativeRefresher, transitionEndAsync, translateElement } from './refresher.utils';
|
||||
@ -415,7 +415,7 @@ export class Refresher implements ComponentInterface {
|
||||
return;
|
||||
}
|
||||
|
||||
await contentEl.componentOnReady();
|
||||
await new Promise(resolve => componentOnReady(contentEl, resolve));
|
||||
|
||||
this.scrollEl = await contentEl.getScrollElement();
|
||||
this.backgroundContentEl = getElementRoot(contentEl).querySelector('#background-content') as HTMLElement;
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import { writeTask } from '@stencil/core';
|
||||
|
||||
import { createAnimation } from '../../utils/animation/animation';
|
||||
import { componentOnReady } from '../../utils/helpers';
|
||||
import { isPlatform } from '../../utils/platform';
|
||||
|
||||
// MD Native Refresher
|
||||
@ -170,7 +171,7 @@ export const shouldUseNativeRefresher = async (referenceEl: HTMLIonRefresherElem
|
||||
const refresherContent = referenceEl.querySelector('ion-refresher-content');
|
||||
if (!refresherContent) { return Promise.resolve(false); }
|
||||
|
||||
await refresherContent.componentOnReady();
|
||||
await new Promise(resolve => componentOnReady(refresherContent, resolve));
|
||||
|
||||
const pullingSpinner = referenceEl.querySelector('ion-refresher-content .refresher-pulling ion-spinner');
|
||||
const refreshingSpinner = referenceEl.querySelector('ion-refresher-content .refresher-refreshing ion-spinner');
|
||||
|
||||
Reference in New Issue
Block a user