Uploaded image for project: 'Weex (Retired)'
  1. Weex (Retired)
  2. WEEX-667

list中下拉刷新后会导致部分cell丢失

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 0.18
    • Fix Version/s: None
    • Component/s: Android
    • Labels:
      None
    • Environment:
      所有Android中

      Description

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

      示例代码

       

      <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>
      

       

        Attachments

          Activity

            People

            • Assignee:
              kyork York Shen
              Reporter:
              Jack奉 Jack
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: