You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@weex.apache.org by "Zisong Lu (JIRA)" <ji...@apache.org> on 2018/04/06 05:45:00 UTC

[jira] [Created] (WEEX-279) recycle-list 组件下的多重循环 错误

Zisong Lu created WEEX-279:
------------------------------

             Summary: recycle-list 组件下的多重循环 错误
                 Key: WEEX-279
                 URL: https://issues.apache.org/jira/browse/WEEX-279
             Project: Weex
          Issue Type: Bug
          Components: Android
    Affects Versions: 0.18
         Environment: Weex SDK Version
0.18.0-beta-3

JS Framework   0.24.5
platform             android
osVersion          5.1
deviceModel      m1 metal
            Reporter: Zisong Lu
            Assignee: Adam Feng


安卓环境 <recycle-list> 组件下的 v-for = "(xx, index) in xxx 循环" , index 无法取得 (ios 正常)
{code:java}
<template>
  <recycle-list for="(item, i) in lists">
    <cell-slot>
      <div v-for="(n, k) in item.ts" :key="k">
        <text class="text">{{n}} -- {{k}}</text>
      </div>
    </cell-slot>
  </recycle-list>
</template>

<script>
export default {
  data () {
    return {
      lists: [
        { ts: ['零', '一', '二', '三', '四'] }
      ]
    }
  }
}
</script>

// 显示结果
//------------------------------------------------
// 安卓: 零 -- 0    ios: 零 -- 0 
// 安卓: 一 -- 0    ios: 一 -- 1 
// 安卓: 二 -- 0    ios: 二 -- 2 
// 安卓: 三 -- 0    ios: 三 -- 3 
// 安卓: 四 -- 0    ios: 四 -- 4 {code}



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