May 19, 2021 WeChat Mini Program Development Document
Base library 2.1.0 starts to support, and low versions need to be compatible.
Dynamically style the pull-down background font and loading diagram
Property | Type | The default | Required | Description |
---|---|---|---|---|
textStyle | string | Is | The style of the pull-down background font, loading diagram. | |
success | function | Whether | The interface calls a successful callback function | |
fail | function | Whether | The interface calls the failed callback function | |
complete | function | Whether | Callback function at end of interface call (call succeeds, fails are executed) |
The legal value of object.textStyle
Value | Description | The lowest version |
---|---|---|
dark | dark style | |
light | Light style |
wx.setBackgroundTextStyle({
textStyle: 'dark' // 下拉背景字体、loading 图的样式为dark
})
Base library 2.1.0 starts to support, and low versions need to be compatible.
Dynamically set the background color of the window
Property | Type | The default | Required | Description |
---|---|---|---|---|
backgroundColor | string | Whether | The background color of the window, which must be a hete size color value | |
backgroundColorTop | string | Whether | The background color of the top window must be a heteen color value, supported only by iOS | |
backgroundColorBottom | string | Whether | The background color of the bottom window, which must be a hete size color value, is supported only by iOS | |
success | function | Whether | The interface calls a successful callback function | |
fail | function | Whether | The interface calls the failed callback function | |
complete | function | Whether | Callback function at end of interface call (call succeeds, fails are executed) |
wx.setBackgroundColor({
backgroundColor: '#ffffff', // 窗口的背景色为白色
})
wx.setBackgroundColor({
backgroundColorTop: '#ffffff', // 顶部窗口的背景色为白色
backgroundColorBottom: '#ffffff', // 底部窗口的背景色为白色
})