English
app side nvue specific component.
<refresh>
provides a pull-down refresh function for the container. On nvue, flexible, customized and high-performance pull-down refresh can be realized with this component.
Notice
<refresh>
is a sub-component of<scroll-view>
,<list>
, and<waterfall>
, which can only be rendered correctly when they are included.
<scroll-view>
<refresh>
<text>Refreshing...</text>
</refresh>
<view v-for="num in lists">
<text>{{num}}</text>
</view>
</scroll-view>
<text>
and <image>
can be rendered in <loading>
.<loading-indicator>
: Can only be used as a sub-component of <refresh>
and <loading>
, with default animation effect.<refresh>
<text>Refreshing</text>
<loading-indicator></loading-indicator>
</refresh>
display
controls the display and hiding of the <refresh>
component. The settings of display
must appear in pairs, i.e., to set display="show"
, there must be a corresponding display="hide"
. The optional value is show / hide
, and the default value is show
.
<scroll-view>
, <list>
, <waterfall>
are pulled down.<scroll-view>
, <list>
, <waterfall>
are pulled down. The following data can be obtained from the event
parameter object:
dy
: the difference of sliding distance between two callbacks.pullingDistance
: pull-down distanceviewHeight
: refresh component heighttype
: "pullingdown" constant string<refresh @refresh="onrefresh" @pullingdown="onpullingdown" :display="refreshing ? 'show' : 'hide'">
<text>Refreshing ...</text>
<loading-indicator></loading-indicator>
</refresh>