问题描述 [问题描述:尽可能简洁清晰地把问题描述清楚] 微信小程序端uni-list、uni-list-item使用v-for循环渲染报错 但是不使用v-for循环渲染不报错。 其他端正常【H5、Android下通过】 复现步骤 [复现问题的步骤] demo如下 <template> <view> <!-- 在v-for循环中使用会报错
</view> 遍历循环主要使用的是wx:for。如果要类比的话,我觉得jstl跟这个神似。先来看看jstl,代码如下: <c:forEachvar="u"items="${user}"> ${u.cid} ${u.cname} ${u.age } </c:forEach> var相当于我可以任意定义一个简要字母来调用item(item相当于type.js中的data或self.setData存储的数据)。
https://github.com/jackiotyu/uni-v-for-demo v-for中使用方法处理数据后,编译到微信小程序时wx:key绑定的字段不对,数据绑定到$orig后,原key字段已经拿不到数据了 Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment Assignees No one assigned Labels...
for(let i=0;i<res.data.list.length;i++) { // 有一些不相关的内容 let item = { content: res.data.list[i], top: 18, animation: {} }; this.cards.push(item); this.showLoading = false; } 其中res.data.list中的数据是每次返回10条, 在初次进入页面时,请求接口的前10条数据循环生成的卡...