//wxml内的代码
<view>
<swiper>
<swiper-item wx:for="{{swiperArr}}" wx:key="unique">
<image :src="{{item.pic}}"></image>
</swiper-item>
</swiper>
<button catchtap="tap">我的图片呢</button>
</view>
//js中代码
data: {
swiperArr: [
{pic: "../../static/images/nvsheng.jpg", id: 1},
{pic: "../../static/images/nvsheng.jpg", id: 1},
{pic: "../../static/images/nvsheng.jpg", id: 1}
]
},
图片使用 网络图片