my.setOptionMenu
Note
This API is supported in mPaaS 10.1.32 and later versions.
Sets an additional icon for the option menu in the navigation bar. Clicking the icon triggers onOptionMenuClick.
Input parameters
Name | Type | Required | Description |
|---|---|---|---|
icon | String | Yes | The URL (starting with https or |
Notes on the icon property
Because of App Transport Security (ATS) restrictions in iOS, the icon URL must be an HTTPS link or a base64 string. HTTP links are ignored.
When the icon is in base64 format, only vector image formats are supported. Do not use the "data:image/png;base64" prefix.
Code example
my.setOptionMenu({
icon: 'https://img.alicdn.com/tps/i3/T1OjaVFl4dXXa.JOZB-114-114.png',
});