mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
fix(): update to Stencil One 🎉🎊
This commit is contained in:
@@ -17,7 +17,7 @@ export class LoadingController implements ComponentInterface, OverlayController
|
||||
*/
|
||||
@Method()
|
||||
create(options?: LoadingOptions): Promise<HTMLIonLoadingElement> {
|
||||
return createOverlay(this.doc.createElement('ion-loading'), options);
|
||||
return createOverlay('ion-loading', options);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -32,7 +32,7 @@ export class LoadingController implements ComponentInterface, OverlayController
|
||||
*/
|
||||
@Method()
|
||||
dismiss(data?: any, role?: string, id?: string) {
|
||||
return dismissOverlay(this.doc, data, role, 'ion-loading', id);
|
||||
return dismissOverlay(document, data, role, 'ion-loading', id);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -40,6 +40,6 @@ export class LoadingController implements ComponentInterface, OverlayController
|
||||
*/
|
||||
@Method()
|
||||
async getTop(): Promise<HTMLIonLoadingElement | undefined> {
|
||||
return getOverlay(this.doc, 'ion-loading') as HTMLIonLoadingElement;
|
||||
return getOverlay(document, 'ion-loading') as HTMLIonLoadingElement;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,12 +34,6 @@ async function presentLoading() {
|
||||
|
||||
Create a loading overlay with loading options.
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Description |
|
||||
| --------- | ----------------------------- | ----------------------------------------- |
|
||||
| `options` | `LoadingOptions \| undefined` | The options to use to create the loading. |
|
||||
|
||||
#### Returns
|
||||
|
||||
Type: `Promise<HTMLIonLoadingElement>`
|
||||
@@ -50,14 +44,6 @@ Type: `Promise<HTMLIonLoadingElement>`
|
||||
|
||||
Dismiss the open loading overlay.
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Description |
|
||||
| ------ | --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `data` | `any` | Any data to emit in the dismiss events. |
|
||||
| `role` | `string \| undefined` | The role of the element that is dismissing the loading. This can be useful in a button handler for determining which button was clicked to dismiss the loading. Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`. |
|
||||
| `id` | `string \| undefined` | The id of the loading to dismiss. If an id is not provided, it will dismiss the most recently opened loading. |
|
||||
|
||||
#### Returns
|
||||
|
||||
Type: `Promise<boolean>`
|
||||
|
||||
Reference in New Issue
Block a user