mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
chore(): update readme
This commit is contained in:
@@ -8,11 +8,49 @@ Modal controllers programmatically control the modal component. Modals can be cr
|
||||
|
||||
## Methods
|
||||
|
||||
| Method | Description |
|
||||
| --------- | ------------------------------------------- |
|
||||
| `create` | Create a modal overlay with modal options. |
|
||||
| `dismiss` | Dismiss the open modal overlay. |
|
||||
| `getTop` | Get the most recently opened modal overlay. |
|
||||
### `create<T extends ComponentRef>(opts: ModalOptions<T>) => Promise<HTMLIonModalElement>`
|
||||
|
||||
Create a modal overlay with modal options.
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Description |
|
||||
| ------ | ----------------- | ----------- |
|
||||
| `opts` | `ModalOptions<T>` | |
|
||||
|
||||
#### Returns
|
||||
|
||||
Type: `Promise<HTMLIonModalElement>`
|
||||
|
||||
|
||||
|
||||
### `dismiss(data?: any, role?: string | undefined, id?: string | undefined) => Promise<boolean>`
|
||||
|
||||
Dismiss the open modal overlay.
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Description |
|
||||
| ------ | -------------------- | ----------- |
|
||||
| `data` | `any` | |
|
||||
| `role` | `string | undefined` | |
|
||||
| `id` | `string | undefined` | |
|
||||
|
||||
#### Returns
|
||||
|
||||
Type: `Promise<boolean>`
|
||||
|
||||
|
||||
|
||||
### `getTop() => Promise<HTMLIonModalElement | undefined>`
|
||||
|
||||
Get the most recently opened modal overlay.
|
||||
|
||||
#### Returns
|
||||
|
||||
Type: `Promise<HTMLIonModalElement | undefined>`
|
||||
|
||||
|
||||
|
||||
|
||||
----------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user