mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
feat(): typed @ionic/docs (#19547)
This commit is contained in:
@@ -2,7 +2,6 @@ import { Build, Component, ComponentInterface, Element, Host, h } from '@stencil
|
||||
|
||||
import { config } from '../../global/config';
|
||||
import { getIonMode } from '../../global/ionic-global';
|
||||
import { rIC } from '../../utils/helpers';
|
||||
import { isPlatform } from '../../utils/platform';
|
||||
|
||||
@Component({
|
||||
@@ -52,3 +51,11 @@ export class App implements ComponentInterface {
|
||||
const needInputShims = () => {
|
||||
return isPlatform(window, 'ios') && isPlatform(window, 'mobile');
|
||||
};
|
||||
|
||||
const rIC = (callback: () => void) => {
|
||||
if ('requestIdleCallback' in window) {
|
||||
(window as any).requestIdleCallback(callback);
|
||||
} else {
|
||||
setTimeout(callback, 32);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { Component, ComponentInterface, Element, Event, EventEmitter, Host, Method, Prop, Watch, h } from '@stencil/core';
|
||||
|
||||
import { getIonMode } from '../../global/ionic-global';
|
||||
import { rIC } from '../../utils/helpers.js';
|
||||
|
||||
import { SwiperInterface, SwiperOptions } from './swiper/swiper-interface';
|
||||
|
||||
@@ -142,7 +141,7 @@ export class Slides implements ComponentInterface {
|
||||
childList: true,
|
||||
subtree: true
|
||||
});
|
||||
rIC(() => this.initSwiper());
|
||||
this.el.componentOnReady().then(() => this.initSwiper());
|
||||
}
|
||||
|
||||
async disconnectedCallback() {
|
||||
|
||||
Reference in New Issue
Block a user