wx:for-items和wx:key怎么不好使
我请求成功了,js是这样的
this .data.searchResults = [ {id: 11, name: '张三' }, {id: 22, name: '李四' } ]; |
xwml是这么写的
< view wx:for-items = "{{searchResults}}" wx:key = "result" > < view class = "items" > < p >{{result.id}} --- {{result.name}}</ p > </ view > </ view > |
以上代码运行后,什么都没输出,请问是什么问题啊