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

NameTypeMandatoryDescription
titleStringNoTitle of the confirm box
contentStringNoContent of the confirm box
confirmButtonTextStringNoOK button text, which is “OK” by default
cancelButtonTextStringNoOK button text, which is “Cancel” by default
successFunctionNoCallback function upon call success
failFunctionNoCallback function upon call failure
completeFunctionNoCallback 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:

NameTypeDescription
confirmBooleanClick Confirm to return true; click Cancel to return false