小程序banner控制面板指示点

设计图上的banner控制面板较为靠上,查了一下,swiper并没有控制面板指示点的位置的方法,于是就在swiper隐藏原有的指示点,然后用div模拟一下

< view class= "headernav">
< swiper indicator-dots= '{{ indicatordots01 }}' indicator-color= '{{initcolor}}' indicator-active-color= '{{initselcolor}}' autoplay= "{{indicatordots01}}" interval= '5000' duration= "1000" current= "{{currswiper}}" bindchange= "bindChangeswi">
< block wx:for= "{{banner}}" wx:key= "*this">
< swiper-item >
< image src= "{{item.httpImg}}" class= "slide-image" mode= "aspectFill"></ image >
</ swiper-item >
</ block >
</ swiper >
< view class= "pagetol">
< block wx:for= "{{banner}}">
< view class= "{{currswiper == index ? 'onnav':''}}" data-current= "{{index}}" bindtap= "pagenow"></ view >
</ block >
</ view >
< view class= "search img-search" bindtap= "gotoSearch"></ view >
</ view >

部分代码如上

猜你喜欢

转载自blog.csdn.net/weixin_38938009/article/details/80348569