Parameters
Success Callback
Code Example
Related APIs
my.alert
Show alert dialog
my.prompt
Show input dialog
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Display a confirmation dialog with confirm and cancel buttons.
| Property | Type | Required | Description |
|---|---|---|---|
| title | String | No | Dialog title |
| content | String | No | Dialog message |
| confirmButtonText | String | No | Confirm button text (default: “OK”) |
| cancelButtonText | String | No | Cancel button text (default: “Cancel”) |
| success | Function | No | Callback with result |
| fail | Function | No | Callback on failure |
| complete | Function | No | Callback that always executes |
| Property | Type | Description |
|---|---|---|
| confirm | Boolean | true if user tapped confirm button |
my.confirm({
title: 'Confirm',
content: 'Are you sure you want to delete this item?',
confirmButtonText: 'Delete',
cancelButtonText: 'Cancel',
success: (result) => {
if (result.confirm) {
this.deleteItem();
}
}
});