非专业键盘侠
非专业键盘侠
  • 发布:2022-04-12 16:58
  • 更新:2023-11-23 11:22
  • 阅读:604

refresh及loading组件该如何正确使用

分类:nvue

refresh组件示例代码

<refresh @refresh="onrefresh" @pullingdown="onpullingdown" :display="refreshing ? 'show' : 'hide'">  
  <text>Refreshing ...</text>  
  <loading-indicator></loading-indicator>  
</refresh>

refresh 组件的使用方式,看文档实在不知道怎么用,在官方的示例代码里找到了案例,照猫画虎算是正常用起来了

loading组件说明

<loading> 用法与特性和 <refresh> 类似,用于给列表添加上拉加载更多的功能。

这个 <loading> 组件该怎么用呢,说和 <refresh> 类似!?类似到什么程度,这块儿要不要出个文档,按理说这两个组件非常常用才对,目前只能靠猜测来写。

环境

  • HX 3.4.5.20220408-alpha
  • fast启动模式开启
  • 纯nvue项目开启
  • uni-app变异模式
  • vue3

遇到的问题

  • loading-indicator 组件一直不能显示,不管在 <refresh> 还是<loading>
  • 怎么控制 loading 的显示隐藏呢? 尝试了类似刷新的写法 :display="loading ? 'show' : 'hide'" ,不生效
2022-04-12 16:58 负责人:无 分享
已邀请:
DCloud_uniAD_HDX

DCloud_uniAD_HDX

设置 refresh display="show", 从你的代码上看 <loading-indicator></loading-indicator> 没有大小,加个宽高样式

  • 2***@qq.com

    请问一下如何主动触发 refresh下拉刷新? ,就是双击后自动下拉刷新

    2022-06-30 08:51

月夜小涵

月夜小涵

请问这个问题解决了吗?

7***@qq.com

7***@qq.com - www.evenfs.cn

https://weexapp.com/zh/docs/components/loading.html#%E4%BA%8B%E4%BB%B6
这里或许有你想要的答案

2***@qq.com

2***@qq.com - 很个性的签名~~~

同问,文档都不全

要回复问题请先登录注册