收藏
回答

swiper 动态设置indicator-dots为false无效

问题模块
API和组件

swiper 动态设置indicator-dots为false无效

<!--幻灯片-->
     <template is="swiper" data="{{list:banner_list,indicatorDots:'false'}}" />
<!--幻灯片-->
<template name="swiper">
  <block wx:if="{{list && list.length>0}}">
    <view class="page__swiper">
      <swiper indicator-dots="{{indicatorDots?indicatorDots:'true'}}" indicator-color="{{indicatorColor?indicatorColor:''}}" indicator-active-color="{{indicatorActiveColor?indicatorActiveColor:'#2395ff'}}" autoplay="{{autoplay?autoplay:'true'}}" current="{{current?current:0}}" interval="{{interval?interval:5000}}" duration="{{duration?duration:1000}}" circular="{{circular?circular:false}}"  vertical="{{vertical?vertical:false}}" bindchange="swiperChange">
        <block wx:for="{{list}}" wx:key="value">
          <swiper-item>
            <block wx:if="{{item.linkurl}}">
              <navigator url="{{item.linkurl}}" hover-class="weui-cell_active">
                <image src="{{item.image_path}}" class="slide-image" width="100%" height="100%" />
              </navigator>
            </block>
            <block wx:else>
              <image src="{{item.image_path}}" class="slide-image" width="100%" height="100%" />
            </block>
          </swiper-item>
        </block>
      </swiper>
    </view>
  </block>
</template>

indicator-dots="true" 或indicator-dots="false" 要删除了圆点才会隐藏,设置为false也无效

最后一次编辑于  2017-10-26  (未经腾讯允许,不得转载)
回答关注问题邀请回答
收藏

1 个回答

  • Jeferry
    Jeferry
    2018-04-19

    <swiper indicator-dots='false' indicator-color='rgba(0, 0, 0, 0)' indicator-active-color='rgba(0, 0, 0, 0)'


    我是这么解决的

    2018-04-19
    赞同
    回复