swan.setBackgroundTextStyle

    解释:设置窗口下拉背景loading样式。

    在开发者工具中预览效果

    扫码体验

    swan.setBackgroundTextStyle - 图4

    代码示例

    1. data: {
    2. },
    3. onShow() {
    4. swan.startPullDownRefresh();
    5. },
    6. setBackgroundTextStyle(e) {
    7. console.log('e', e.target.dataset.set);
    8. let that = this;
    9. swan.setBackgroundTextStyle({
    10. textStyle: textStyle,
    11. success: function () {
    12. if(textStyle == 'dark') {
    13. that.setData('textStyle', 'light')
    14. }
    15. that.setData('textStyle', 'dark')
    16. }
    17. },
    18. fail: err => {
    19. console.log('setBackgroundTextStyle fail', err);
    20. }
    21. });

    iOS