diff --git a/docs/component/_sidebar.md b/docs/component/_sidebar.md index ef437bfc12702aef8f408813793efaa0ccf50220..b93a0168836a19d1a81bdeb36f3783ba11c0a567 100644 --- a/docs/component/_sidebar.md +++ b/docs/component/_sidebar.md @@ -48,7 +48,8 @@ * [list](component/list.md) * [cell](component/cell.md) * [recycle-list](component/recycle-list.md) - * [waterfall](component/waterfall.md) + * [waterfall](component/waterfall.md) + * [refresh](component/refresh.md) * 扩展组件(uni ui) * [uni-ui整体介绍](component/README?id=uniui) * [Badge 数字角标](https://ext.dcloud.net.cn/plugin?id=21) diff --git a/docs/component/refresh.md b/docs/component/refresh.md new file mode 100644 index 0000000000000000000000000000000000000000..c698b80c32489350fbc247c42f5e623e047d18d6 --- /dev/null +++ b/docs/component/refresh.md @@ -0,0 +1,54 @@ +#### refresh + +app端nvue专用组件。 + +`` 为容器提供下拉刷新功能。 + + +> 注意 +> - `` 是 ``、``、`` 的子组件,只能在被它们包含时才能被正确渲染。 + + +``` + + + Refreshing... + +
+ {{num}} +
+
+``` + +#### 子组件 + +- 诸如 ``、`` 之类的任何组件,都可以放到 `` 进行渲染。 +- 特殊子组件 ``: 只能作为 `` 和 `` 的子组件使用,拥有默认的动画效果实现。 + +``` + + Refreshing + + +``` + +#### 属性 + +`display` +控制 `` 组件显示、隐藏。`display` 的设置必须成对出现,即设置 `display="show"`, 必须有对应的 `display="hide"`。可选值为 `show / hide`,默认值为 `show`。 + + +#### 事件 +- refresh 事件:当 ``、``、`` 被下拉完成时触发。 +- pullingdown 事件:当 ``、``、`` 被下拉时触发。 可以从 `event` 参数对象中获取以下数据: + - `dy`: 前后两次回调滑动距离的差值 + - `pullingDistance`: 下拉的距离 + - `viewHeight`: refresh 组件高度 + - `type`: “pullingdown” 常数字符串 + +``` + + Refreshing ... + + +```