1.0.7 • Published 5 years ago

acc-swiper v1.0.7

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago

#acc-swiper

The goal is to be a high-performance tabs component ,Resolving Mobile Gestures

###使用

    npm install acc-swiper
    <!-- swiper名称可以自定义的啦 -->
    <div id="swiper">
        <!-- swiper-item名称也可以自定义啦,相当于一个滑块 -->
        <div class="swiper-item">
            <img src="./images/1.jpg" />
        </div>
        <div class="swiper-item">
            <img src="./images/2.jpg" />
        </div>
        <div class="swiper-item">
            <img src="./images/3.jpg" />
        </div>
    </div>
    import AccSwiper from 'acc-swiper'

    new AccSwiper({
        swiper: '#swiper',		// swiper节点名称
        item: '.swiper-item',	// swiper内部滑块的节点名称
        container:null,         // swiper滑动容器,建议必须参数,如果不穿将只作为swiper轮播,无法                             派发浏览器事件
        change(index) {			// 每滑动一个滑块,插件就会触发change函数,index表示当前的滑块下标
            console.log(index);
        }
    });

AccSwiper

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago