//如果是网络图片
<view class="payicon"><image :src="item.payChannel == 4 ? selectimg[0].imgUrl :item.payChannel == 3 ? selectimg[0].imgUrl2 : selectimg[0].imgUrl3" mode=""></image></view>
export default {
data() {
return {
selectimg:[{
imgUrl:'http://static.hiyunyu.com/images/ogo.png',
imgUrl2:'http://static.hiyunyu.com/images/zblogo.png',
imgUrl3:'http://static.hiyunyu.com/images/UioPay.png'
//如果是本地图片最好加个require imgUrl3:require('../../static/image/UnionPay.png')
}]
}
}
}
uni-app中动态展示图片
于 2022-08-17 15:24:26 首次发布