This article mainly introduces the detailed explanation and example code of WeChat applet loading. Friends in need can refer to it
WeChat applet loading
Attribute name | Type | Default value | Description |
---|---|---|---|
hidden | Boolean | false | Whether to hide |
Sample code:
<view class="body-view"> <loading hidden="{{hidden}}"> 加载中... </loading> <button type="default" bindtap="loadingTap">点击弹出loading</button> </view>
Page({ data: { hidden: true }, loadingTap: function(){ this.setData({ hidden: false }); var that = this; setTimeout(function(){ that.setData({ hidden: true }); that.update(); }, 3000); } })
Thank you for reading, I hope it can help everyone, thank you for your support of this site support!
For more WeChat applet loading, please pay attention to the PHP Chinese website for detailed explanations and sample code related articles!