微信小程序 loading 详解及实例代码
微信小程序开发文档,相关文章:
微信小程序 action-sheet
微信小程序modal
微信小程序toast
微信小程序loading
微信小程序loading
示例代码:
<viewclass="body-view">
<loadinghidden="{{hidden}}">
加载中...
</loading>
<buttontype="default"bindtap="loadingTap">点击弹出loading</button>
</view>
Page({
data:{
hidden:true
},
loadingTap:function(){
this.setData({
hidden:false
});
varthat=this;
setTimeout(function(){
that.setData({
hidden:true
});
that.update();
},3000);
}
})
感谢阅读,希望能帮助到大家,谢谢大家对本站的支持!