mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
docs(components): update method and parameter descriptions (#18075)
This commit is contained in:
@@ -12,14 +12,23 @@ export class LoadingController implements ComponentInterface, OverlayController
|
||||
|
||||
/**
|
||||
* Create a loading overlay with loading options.
|
||||
*
|
||||
* @param options The options to use to create the loading.
|
||||
*/
|
||||
@Method()
|
||||
create(opts?: LoadingOptions): Promise<HTMLIonLoadingElement> {
|
||||
return createOverlay(this.doc.createElement('ion-loading'), opts);
|
||||
create(options?: LoadingOptions): Promise<HTMLIonLoadingElement> {
|
||||
return createOverlay(this.doc.createElement('ion-loading'), options);
|
||||
}
|
||||
|
||||
/**
|
||||
* Dismiss the open loading overlay.
|
||||
*
|
||||
* @param data Any data to emit in the dismiss events.
|
||||
* @param role 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"`.
|
||||
* @param id The id of the loading to dismiss. If an id is not provided, it will dismiss the most recently opened loading.
|
||||
*/
|
||||
@Method()
|
||||
dismiss(data?: any, role?: string, id?: string) {
|
||||
|
||||
@@ -30,15 +30,15 @@ async function presentLoading() {
|
||||
|
||||
## Methods
|
||||
|
||||
### `create(opts?: LoadingOptions | undefined) => Promise<HTMLIonLoadingElement>`
|
||||
### `create(options?: LoadingOptions | undefined) => Promise<HTMLIonLoadingElement>`
|
||||
|
||||
Create a loading overlay with loading options.
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Description |
|
||||
| ------ | ----------------------------- | ----------- |
|
||||
| `opts` | `LoadingOptions \| undefined` | |
|
||||
| Name | Type | Description |
|
||||
| --------- | ----------------------------- | ----------------------------------------- |
|
||||
| `options` | `LoadingOptions \| undefined` | The options to use to create the loading. |
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -52,11 +52,11 @@ Dismiss the open loading overlay.
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Description |
|
||||
| ------ | --------------------- | ----------- |
|
||||
| `data` | `any` | |
|
||||
| `role` | `string \| undefined` | |
|
||||
| `id` | `string \| undefined` | |
|
||||
| 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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user