Show an error message in the lower right corner of the window.
Name |
Type |
Description |
message |
String |
The message to show, support html tags |
buttons |
Array<String> |
Button group in notification box |
Type |
Description |
Promise<String> |
A promise that resolves to the selected item. |
let resultPromise = hx.window.showErrorMessage('Do you want to delete the file?',['Yes','No']);
resultPromise.then((result)=>{
if(result == 'Yes'){
console.log("Your choice: Yes");
}else if(result === 'No'){
console.log("Your choice: No");
}
});
Show an information message in the lower right corner of the window.
Name |
Type |
Description |
message |
String |
The message to show, support html tags |
buttons |
Array<String> |
Button group in notification box |
Type |
Description |
Promise<String> |
A promise that resolves to the selected item. |
hx.window.showInformationMessage('Learn More <a href="http://www.dcloud.io">Reference Documents</a>');

Show a warning message in the lower right corner of the window.
Name |
Type |
Description |
message |
String |
The message to show, support html tags |
buttons |
Array<String> |
Button group in notification box |
Type |
Description |
Promise<String> |
A promise that resolves to the selected item. |
let resultPromise = hx.window.showWarningMessage('Do you want to delete the file?',['Yes','No']);
resultPromise.then((result)=>{
if(result == 'Yes'){
console.log("Your choice: Yes");
}else if(result === 'No'){
console.log("Your choice: No");
}
});
Found mistake? Want to participate in editing? Edit this page on GitHub
HBuilderX plug-in development document, not translated into English, welcome to contribute. Translate this document on github