raise
raise
  • 发布:2019-11-16 23:35
  • 更新:2019-11-19 18:20
  • 阅读:1104

【报Bug】waterfall 组件内部高度未超过本身高度时,refresh无法触发。换成list组件正常【重点:这次安卓正常,苹果不行】

分类:nvue

hbuilderx 版本:2.4.2.20191115-alpha

纯nvue项目

waterfall 组件内部高度未超过本身高度时,refresh事件无法触发;即【仅当所有cell堆叠之后的高超过waterfall的高之后才能触发】。而且把 waterfall组件 换成list组件可以正常触发
【重点:这次安卓正常,苹果不行】

代码如下
<template>
<waterfall column-count="2" class="box">
<refresh @refresh="onrefresh" :display="refreshing ? 'show' : 'hide'">
-------------- <loading-indicator></loading-indicator>
</refresh>
<cell class="cell">
424
</cell>
<cell class="cell">
424
</cell>
</waterfall>
</template>

<script>
export default {
data() {
return {
refreshing: false
}
},
onLoad() {

    },  
    methods: {  
        onrefresh (event) {  
            this.refreshing = true  
            setTimeout(() => {  
              this.refreshing = false  
            }, 2000)  
        },  
    }  
}  

</script>
<style>
.box{
height: 500px;
background-color: #DD524D;
}
.cell{
height: 100px;
/ height: 800px; 这个才正常 /
background-color: #007AFF;
margin: 5px;
}
</style>

2019-11-16 23:35 负责人:无 分享
已邀请:
DCloud_iOS_XHY

DCloud_iOS_XHY

默认子视图高度不超过父视图高度的时候 waterfall 不能滑动,可以添加属性 alwaysScrollableVertical="true" 强制滑动

<waterfall alwaysScrollableVertical="true" class="box" column-count="2">  
        <refresh @refresh="onrefresh"  :display="refreshing ? 'show' : 'hide'">  
          <text class="refreshText">刷新中 ...</text>  
        </refresh>  
        <cell class="cell">1</cell>  
        <cell class="cell">2</cell>  
        <cell class="cell">3</cell>  
    </waterfall>
  • raise (作者)

    demo已补充,请查阅。【重点:这次安卓正常,苹果不行】

    2019-11-18 17:30

  • DCloud_iOS_XHY

    回复 raise: 参考上面的示例代码

    2019-11-19 18:21

raise

raise (作者)

完整bug示例如下

该问题目前已经被锁定, 无法添加新回复