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>
相关文章: