Jack created WEEX-667:
-------------------------

             Summary: list中下拉刷新后会导致部分cell丢失
                 Key: WEEX-667
                 URL: https://issues.apache.org/jira/browse/WEEX-667
             Project: Weex
          Issue Type: Bug
          Components: Android
    Affects Versions: 0.18
         Environment: 所有Android中
            Reporter: Jack
            Assignee: YorkShen
         Attachments: image-2018-11-23-20-39-39-806.png

在Android中反复下拉刷新几次,会导致序号6的方块消失,而改用Scroller不会有这个问题,

!image-2018-11-23-20-39-39-806.png!

示例代码

 
{code:java}
<template>
<list class="scroller">
<refresh class="refresh" @refresh="onrefresh" @pullingdown="onpullingdown" 
:display="refreshing ? 'show' : 'hide'">
<text class="indicator-text">Refreshing ...</text>
<loading-indicator class="indicator"></loading-indicator>
</refresh>
<cell class="cell" v-for="(item,i) in 10" :key="i">
<div class="panel">
<text class="text">{{item}}</text>
</div>
</cell>
</list>
</template>

<script>
const modal = weex.requireModule('modal')

export default {
data () {
return {
refreshing: false,
}
},
methods: {
onrefresh (event) {
modal.toast({ message: 'Refreshing', duration: 1 })
this.refreshing = true
setTimeout(() => {
this.refreshing = false
}, 2000)
},
onpullingdown (event) {
console.log("dy: " + event.dy)
console.log("pullingDistance: " + event.pullingDistance)
console.log("viewHeight: " + event.viewHeight)
console.log("type: " + type)
}
}
}
</script>

<style scoped>
.refresh {
width: 750;
display: -ms-flex;
display: -webkit-flex;
display: flex;
-ms-flex-align: center;
-webkit-align-items: center;
-webkit-box-align: center;
align-items: center;
}
.indicator-text {
color: #888888;
font-size: 42px;
text-align: center;
}
.indicator {
margin-top: 16px;
height: 40px;
width: 40px;
color: blue;
}
.panel {
width: 600px;
height: 250px;
margin-left: 75px;
margin-top: 35px;
margin-bottom: 35px;
flex-direction: column;
justify-content: center;
border-width: 2px;
border-style: solid;
border-color: #DDDDDD;
background-color: #F5F5F5;
}
.text {
font-size: 50px;
text-align: center;
color: #41B883;
}
</style>
{code}
 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to