This API is used via wx.setBackgroundColor(Object object).
Attribute | Type | Default value | Required | Note |
backgroundColor | string | - | No | Background color value, which must be a hexadecimal color value. |
backgroundColorTop | string | - | No | Background color of the top window, which must be a hexadecimal color value. This feature is supported only on iOS. |
backgroundColorBottom | string | - | No | Background color of the bottom window, which must be a hexadecimal color value. This feature is supported only on iOS. |
success | function | - | No | Callback Function of Successful Interface Call |
fail | function | - | No | Callback Function of Failing Interface Call |
complete | function | - | No | Callback function executed upon the completion of the interface invocation (both successful and unsuccessful invocations) |
wx.setBackgroundColor({backgroundColor: '#ffffff', // The background color of the window is white.})wx.setBackgroundColor({backgroundColorTop: '#ffffff', // The background color of the top window is white.backgroundColorBottom: '#ffffff', // The background color of the bottom window is white.})
This API is used via wx.setBackgroundTextStyle(Object object).
Attribute | Type | Default value | Required | Note |
textStyle | string | - | Yes | The style of the dropdown background text and loading image. |
success | function | - | No | Callback Function of Successful Interface Call |
fail | function | - | No | Callback Function of Failing Interface Call |
complete | function | - | No | Callback function executed upon the completion of the interface invocation (both successful and unsuccessful invocations) |
Value | Note |
dark | Dark mode |
light | Light mode |
wx.setBackgroundTextStyle({textStyle: 'dark' // The dropdown background text and loading icon styles are set to dark.})
Was this page helpful?