Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
tomleePHP
uni-app
提交
2ba8e01c
U
uni-app
项目概览
tomleePHP
/
uni-app
与 Fork 源项目一致
Fork自
DCloud / uni-app
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-app
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
2ba8e01c
编写于
8月 19, 2019
作者:
d-u-a
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
docs: add nvue component <refresh>
上级
a0a9daf5
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
56 addition
and
1 deletion
+56
-1
docs/component/_sidebar.md
docs/component/_sidebar.md
+2
-1
docs/component/refresh.md
docs/component/refresh.md
+54
-0
未找到文件。
docs/component/_sidebar.md
浏览文件 @
2ba8e01c
...
...
@@ -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
)
...
...
docs/component/refresh.md
0 → 100644
浏览文件 @
2ba8e01c
#### refresh
app端nvue专用组件。
`<refresh>`
为容器提供下拉刷新功能。
> 注意
> - `<refresh>` 是 `<scroll-view>`、`<list>`、`<waterfall>` 的子组件,只能在被它们包含时才能被正确渲染。
```
<scroll-view>
<refresh>
<text>Refreshing...</text>
</refresh>
<div v-for="num in lists">
<text>{{num}}</text>
</div>
</scroll-view>
```
#### 子组件
-
诸如
`<text>`
、
`<image>`
之类的任何组件,都可以放到
`<loading>`
进行渲染。
-
特殊子组件
`<loading-indicator>`
: 只能作为
`<refresh>`
和
`<loading>`
的子组件使用,拥有默认的动画效果实现。
```
<refresh>
<text>Refreshing</text>
<loading-indicator></loading-indicator>
</refresh>
```
#### 属性
`display`
控制
`<refresh>`
组件显示、隐藏。
`display`
的设置必须成对出现,即设置
`display="show"`
, 必须有对应的
`display="hide"`
。可选值为
`show / hide`
,默认值为
`show`
。
#### 事件
-
refresh 事件:当
`<scroll-view>`
、
`<list>`
、
`<waterfall>`
被下拉完成时触发。
-
pullingdown 事件:当
`<scroll-view>`
、
`<list>`
、
`<waterfall>`
被下拉时触发。 可以从
`event`
参数对象中获取以下数据:
-
`dy`
: 前后两次回调滑动距离的差值
-
`pullingDistance`
: 下拉的距离
-
`viewHeight`
: refresh 组件高度
-
`type`
: “pullingdown” 常数字符串
```
<refresh @refresh="onrefresh" @pullingdown="onpullingdown" :display="refreshing ? 'show' : 'hide'">
<text>Refreshing ...</text>
<loading-indicator></loading-indicator>
</refresh>
```
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录