微信小程序绑定列表数据

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>

猜你喜欢

转载自www.cnblogs.com/bincoding/p/10854471.html