tencent cloud

Feedback

Background

Last updated: 2024-11-21 18:41:53

    setBackgroundColor

    This API is used via wx.setBackgroundColor(Object object).
    Feature Description: Dynamically sets the background color of the window.
    Parameter and Description: 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)
    Sample Code
    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.
    })

    setBackgroundTextStyle

    This API is used via wx.setBackgroundTextStyle(Object object).
    Feature Description: Dynamically sets the style of the dropdown background font and loading image.
    Parameter and Description: 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)
    Valid values of object.textStyle
    Value
    Note
    dark
    Dark mode
    light
    Light mode
    Sample Code
    wx.setBackgroundTextStyle({
    textStyle: 'dark' // The dropdown background text and loading icon styles are set to dark.
    })
    
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support