Skip to content
This repository was archived by the owner on Mar 27, 2023. It is now read-only.

Commit 0734f79

Browse files
committed
[FIX]: 1、Swipe组件dots=false,是不能拖拽让轮播进入下一项;2、onDrag回调行数添加向左拖还是向右拖参数。
1 parent 6d612dc commit 0734f79

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-impression",
3-
"version": "0.13.9",
3+
"version": "0.13.11",
44
"description": "A Vue.js 2.0 UI elements for mobile.",
55
"main": "dist/scripts/components/index.js",
66
"scripts": {

src/scripts/components/Swipe.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<div class="swipe-items">
44
<slot></slot>
55
</div>
6-
<div class="swipe-indicators" v-if="dots">
6+
<div class="swipe-indicators" v-show="dots">
77
<div class="swipe-indicator" :class="{active: index - 1 === activeIndex}" v-for="index in length"></div>
88
</div>
99
</div>
@@ -100,11 +100,10 @@
100100
clearInterval(this.swipeInterval);
101101
},
102102
onDrag: option => {
103-
this.onDrag && this.onDrag(this.activeIndex);
104-
105103
if(this.transitioning) return;
106104
107105
translateX = option.translateX;
106+
this.onDrag && this.onDrag(this.activeIndex, translateX);
108107
109108
if(translateX === 0) return;
110109
// 往左

0 commit comments

Comments
 (0)