my.setNavigationBar
Set the navigation bar text and style.
Sample Code
copy
my.setNavigationBar({
title: 'hello',
backgroundColor: '#108ee9',
success() {
my.alert({
content: 'Success',
});
},
fail() {
my.alert({
content: 'Failed',
});
},
});
Parameters
Name | Type | Mandatory | Description |
title | String | No | Navigation bar title |
image | String | No | Picture link address, must be https. Use 3x high-definition pictures. If the image is set, the title parameter is inactive. |
backgroundColor | String | No | Navigation bar background color, supporting hex color value |
borderBottomColor | String | No | Navigation bar bottom border color, supporting hex color value If the backgroundColor is set, the borderBottomColor does not take effect. The backgroundColor is used by default. |
reset | Boolean | No | If the navigation bar is reset to the default color scheme of Alipay, false 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) |