
style="width:225upxwhite-space: nowrapoverflow: hiddentext-overflow: ellipsis">//限制显示次数
<view class="homestay-list" v-for="(item3,index) in hotellist" :id="item3.id">
<image :src=item3.hotelimage></image>
<view class="homestay-text">
<view>
<text class="homestay-money">tel:<strong style="font-size:28upx">{{item3.hotelphone}}</strong></text>
<text class="homestay-membermoney">{{item3.cityname}}<strong></strong></text>
</view>
<view class="homestay-between">
<text class="homestay-people" style="width:225upxwhite-space: nowrapoverflow: hiddentext-overflow: ellipsis">{{item3.hoteltag}}</text>
<view>
<image src="/static/img/x.png"></image>
<text class="homestay-start">{{item3.star_type}}.0</text>
</view>
</view>
<view>
<text class="homestay-txt">{{item3.hotelname}}</text>
</view>
</view>
</view> //一个循环遍历的显示的典型例子
(1) 动态class样式
(2) 图片动态资源 :src
eg1:后台返回图片的相对路径,需拼接完整的网络地址
eg2:动态图片资源和动态class样式
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)