swan.setBackgroundTextStyle
解释:设置窗口下拉背景loading样式。
扫码体验
代码示例
data: {
},
onShow() {
swan.startPullDownRefresh();
},
setBackgroundTextStyle(e) {
console.log('e', e.target.dataset.set);
let that = this;
swan.setBackgroundTextStyle({
textStyle: textStyle,
success: function () {
if(textStyle == 'dark') {
that.setData('textStyle', 'light')
}
that.setData('textStyle', 'dark')
}
},
fail: err => {
console.log('setBackgroundTextStyle fail', err);
}
});