我怎么用都報錯,我搞不太懂,我是要在onReachBottom 時調用settimeout(callback(),5000);為了顯示代碼如下data: {hidden:true},onReachBottom: function() {if(this.data.page < this.data.total){ this.setData({ hidden: false }); this.data.page = this.data.page + 1; this.refreshBulletins();
setTimeout(callback(),5000)
}},<loading hidden="{{hidden}}">加載中...</loading>在callback結束時this.setData({ hidden: false});
微信小程序可以正常使用settimeout嗎?
函數式編程
2018-11-07 13:14:22