my.confirm
Confirm box.
Sample Code
copy
my.confirm({
title: 'Tips',
content: 'Do you want to check the courier number: 1234567890?',
confirmButtonText: 'Inquire now',
cancelButtonText: 'Not needed',
success: (result) => {
my.alert({
title: `${result.confirm}`,
});
},
});
Parameters
Property | Type | Required | Description |
title | String | No | Title of the confirm box. |
content | String | No | Content of the confirm box. |
confirmButtonText | String | No | OK button text, which is “OK” by default. |
cancelButtonText | String | No | OK button text, which is “Cancel” by default. |
success | Function | No | Callback function upon call success. |
fail | Function | No | Callback function upon call failure. |
complete | Function | No | Callback function upon call completion (to be executed upon either call success or failure). |
Success Callback Function
The incoming parameter is of the Object type with the following attributes:
Property | Type | Description |
confirm | Boolean | Click Confirm to return true; click Cancel to return false. |