Taro.setBackgroundTextStyle(option)
Dynamically sets the style of the text and the loading image in the pull-down background.
Type
(option: Option) => Promise<CallbackResult>
Parameters
Option
Property | Type | Required | Description |
---|---|---|---|
textStyle | "dark" | "light" | Yes | The style of the text and the loading image in the pull-down background. Enum: - 'dark': In dark style; - 'light': In light style; |
complete | (res: CallbackResult) => void | No | The callback function used when the API call completed (always executed whether the call succeeds or fails) |
fail | (res: CallbackResult) => void | No | The callback function for a failed API call |
success | (res: CallbackResult) => void | No | The callback function for a successful API call |
Sample Code
Taro.setBackgroundTextStyle({
textStyle: 'dark' // Yes | The style of the text and the loading image is dark.
})
API Support
API | WeChat Mini-Program | H5 | React Native |
---|---|---|---|
Taro.setBackgroundTextStyle | ✔️ | ✔️ (Only iOS) |