my.setOptionMenu
Note: This interface is only supported in mPaaS 10.1.32 and later versions.
This interface is used to configure additional icons on the
optionMenu
navigation bar. Clicking any of these icons triggers onOptionMenuClick
.
Parameters
Name | Type | Required | Description |
---|---|---|---|
icon | String | Required | Customizes the URL, which starts with https or http , or Base64 string of the icon used by optionMenu. We recommend that you set the size of the icon to 30×30.Base64 images are currently not supported. |
Notes on icon attributes
- Subject to iOS App Transport Security (ATS) restrictions, icon URLs must be HTTPS links or in Base64 format, and HTTP links will be ignored.
- If the icon is in Base64 format, only the vector format is supported, and the prefix must not be
data:image/png;base64
.
Sample code
my.setOptionMenu({
icon: 'https://img.alicdn.com/tps/i3/T1OjaVFl4dXXa.JOZB-114-114.png',
});