mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-12-19 05:19:42 +08:00
feat(): typed @ionic/docs (#19547)
This commit is contained in:
@@ -34,7 +34,7 @@
|
||||
"tslib": "^1.10.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@stencil/core": "1.5.3",
|
||||
"@stencil/core": "1.6.1",
|
||||
"@stencil/sass": "1.0.1",
|
||||
"@types/jest": "24.0.17",
|
||||
"@types/node": "12.7.1",
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -19,14 +19,6 @@ export const raf = (h: any) => {
|
||||
return setTimeout(h);
|
||||
};
|
||||
|
||||
export const rIC = (callback: () => void) => {
|
||||
if ('requestIdleCallback' in window) {
|
||||
(window as any).requestIdleCallback(callback);
|
||||
} else {
|
||||
setTimeout(callback, 32);
|
||||
}
|
||||
};
|
||||
|
||||
export const hasShadowDom = (el: HTMLElement) => {
|
||||
return !!el.shadowRoot && !!(el as any).attachShadow;
|
||||
};
|
||||
|
||||
1
docs/.gitignore
vendored
1
docs/.gitignore
vendored
@@ -1 +1,2 @@
|
||||
core.json
|
||||
core.d.ts
|
||||
|
||||
@@ -3,8 +3,10 @@
|
||||
"version": "4.10.2",
|
||||
"description": "Pre-packaged API documentation for the Ionic docs.",
|
||||
"main": "core.json",
|
||||
"types": "core.d.ts",
|
||||
"files": [
|
||||
"core.json"
|
||||
"core.json",
|
||||
"core.d.ts"
|
||||
],
|
||||
"author": "Ionic Team",
|
||||
"license": "MIT",
|
||||
|
||||
Reference in New Issue
Block a user