下拉刷新
下拉刷新提供与WeLink规范一致的视图。
需引入 pulltorefresh.min.js。
效果图:
HTML
<script src="./pulltorefresh.min.js"></script>
<div class="weui-cells__title">基础样式</div>
<div class="weui-loading-dot-content">
<div class="weui-loading-dot">
<i></i>
<i></i>
<i></i>
</div>
</div>
<div class="weui-cells__title">动画效果</div>
<div id="refresh-body">
<div style="text-align: center; font-size: 14px;">
下拉查看效果
</div>
</div>
<script type="text/javascript">
PullToRefresh.init({
mainElement: '#refresh-body',
onRefresh() {
return new Promise(function(resolve) {
setTimeout(resolve, 1800);
});
},
});
</script>