1、swiper组件直接运用时, .content>swiper{height:100%} 是不起作用的。

      正确的做法是:

  

swiper{
  height: 100vh;  
}

// 或者

<swiper style="height:calc(100vh - {{titleBarHeight+statusBarHeight}}px)" vertical="{{false}}" >
      <block wx:for="{{weeks}}">
        <swiper-item>
          <view class='testItem' >
            <label wx:for="{{ceils}}" >{{item}}</label>
          </view>
        </swiper-item>
      </block>
    </swiper>
          

   注:也就是说 必须只能用 标签选择器去设置样式,而且设置尺寸的值不能是百分比,必须是具体的高度。或者 在mxml的style中动态设置

相关文章:

  • 2022-01-07
  • 2021-12-04
  • 2021-07-27
  • 2021-08-23
  • 2022-12-23
  • 2021-10-11
  • 2021-05-16
猜你喜欢
  • 2022-12-23
  • 2021-08-30
  • 2021-09-11
  • 2022-01-25
  • 2021-07-19
相关资源
相似解决方案