js代码
Page({
/**
* 页面的初始数据
*/
data: {
words:[]
}
wxml代码
<view wx:for="{{words}}" class='content-list' wx:key="item" wx:for-index="key">
<view class='content'>{{item.content}}</view>
</view>
Page({
/**
* 页面的初始数据
*/
data: {
words:[]
}
<view wx:for="{{words}}" class='content-list' wx:key="item" wx:for-index="key">
<view class='content'>{{item.content}}</view>
</view>
转载于:https://www.cnblogs.com/bincoding/p/10854471.html