haoMan
haoMan
  • 发布:2019-01-10 15:18
  • 更新:2020-03-08 23:25
  • 阅读:3073

自定义组件为什么不能v-for循环渲染出来

分类:uni-app

<uni-list >
<uni-list-item v-for="(item, itemIndex) in testlist" :key="itemIndex" :title="'aaaaaaa'"> </uni-list-item>
</uni-list >

2019-01-10 15:18 1 条评论 负责人:无 分享
已邀请:
haoMan

haoMan (作者) - 活到老学到老

如下这样才行 我不是很懂为什么
<view class="uni-list">
<view v-for="(list, index) in lists" :key="index">
<uni-list-item :title="'aaaaaaa'"></uni-list-item>
</view>
</view>

  • weucn

    你这个是代码是放在父页面还是子组件

    2019-10-07 09:42

4***@qq.com

4***@qq.com

<uni-list v-for="(item,index) in news" :key="index">
<uni-list-item :show-arrow="true" :title="item.a" :note="item.b" @click = "cc"/>
</uni-list>

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