首页 > 微信 > 详细

微信小程序动态获取元素的高度 / 微信小程序动态设置轮播图高度

时间:2020-06-03 12:35:22      阅读:73      评论:0      收藏:0      [点我收藏+]

1.技术分享图片

 

 

 

<view class="series-list" style="margin-top:{{marginTop}}rpx">
  <swiper style="width: 702rpx;height:{{swiperHeight}}px;position: relative" current="{{selectCurrent}}" class="swiper-box" bindchange="swiperChange">
    <block wx:for="{{lists}}" wx:key="index">
      <swiper-item>
        <view style="display:flex;flex-wrap:wrap" class="getHeight">
          <view class="series-list-item" wx:for="{{item}}" wx:key="index">
            <navigator url="{{‘/pages/search/search?type=tag&tag_id=‘+item.id}}">
              <image class="series-list-item-img" src="{{item.picUrl || ‘../../images/home_bg_pic@2x.png‘}}" mode="aspectFit" style="background-image:url({{label_bg_pic_url}})"></image>
              <view class="series-list-item-name text-more {{tab == 0 ? ‘index‘ : ‘‘}}">
                {{item.rename || item.name}}
              </view>
            </navigator>
          </view>
        </view>
      </swiper-item>
    </block>
  </swiper>
  <view class="swiperBox" wx:if="{{lists.length >1}}">
    <view class="swiperBox1 {{current == index ?‘select‘:‘‘}}" wx:for="{{lists}}" wx:key="index"></view>
  </view>
</view>
2.js:
技术分享图片

 

 技术分享图片

 

 

微信小程序动态获取元素的高度 / 微信小程序动态设置轮播图高度

原文:https://www.cnblogs.com/cm521mzg/p/13036282.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!