2021-12-12 17:15:24 +08:00

43 lines
2.0 KiB
Plaintext

<view>
<movable-area class="movable-area">
<movable-view class="scroll"
bind:change="change"
bind:touchend="touchend"
direction="vertical"
disabled="{{refreshStatus >= 3}}"
y='{{move}}'>
<scroll-view class="scroll__view"
style="padding-top: {{ hasTop ? refreshSize : 0}}rpx;"
scroll-y="{{refreshStatus == 1}}"
bindscroll="scroll"
scroll-top="{{scrollTop}}"
enable-back-to-top="{{enableBackToTop}}"
lower-threshold="{{80}}rpx"
bindscrolltolower="more">
<view id="refresh" class="scroll__refresh {{successShow ? 'scroll__refresh--hidden' : ''}}" style="height: {{refreshSize}}rpx;padding: 20rpx 0;">
<view class="scroll__loading">
<view wx:if="{{refreshStatus == 1 || refreshStatus == 2}}" class="{{refreshStatus == 2 ? 'rotate' : ''}} arrow"></view>
<view wx:if="{{refreshStatus == 3}}" class="loading">
<view class="loading__item"></view>
<view class="loading__item"></view>
<view class="loading__item"></view>
<view class="loading__item"></view>
<view class="loading__item"></view>
<view class="loading__item"></view>
<view class="loading__item"></view>
<view class="loading__item"></view>
<view class="loading__item"></view>
<view class="loading__item"></view>
<view class="loading__item"></view>
<view class="loading__item"></view>
</view>
<view class="text" wx:if="{{refreshStatus == 1}}">下拉刷新</view>
<view class="text" wx:elif="{{refreshStatus == 2}}">松开更新</view>
<view class="text" wx:elif="{{refreshStatus == 3}}">加载中...</view>
</view>
</view>
<slot></slot>
</scroll-view>
</movable-view>
</movable-area>
</view>