wangnan 7 years ago
parent
commit
e862259f40
2 changed files with 3 additions and 3 deletions
  1. 1 1
      src/demo/swiper.vue
  2. 2 2
      src/package/swiper/src/swiper.vue

+ 1 - 1
src/demo/swiper.vue

@@ -11,7 +11,7 @@
             direction="horizontal"
              ref="demo1"
              @slideChangeEnd="slideChangeEnd">
-            <div v-for="item in dataItem" class="nut-swiper-silde"><span>page{{item.name}}</span></div>
+            <div v-for="item in dataItem" class="nut-swiper-silde" :key="item.name"><span>page{{item.name}}</span></div>
 
         </nut-swiper>
 

+ 2 - 2
src/package/swiper/src/swiper.vue

@@ -2,7 +2,7 @@
     <div class="nut-swiper"
         :class="[direction,{'dragging':dragging}]"
         @touchstart="_onTouchStart($event)"
-        @mousedown="_onTouchStart($event)">
+        @mousedown="_onTouchStart($event)" @touchMove.stop>
         <div class="nut-swiper-wrap"
             :style="{
                     'transform':'translate3d('+translateX+'px,'+translateY+'px,0)',
@@ -14,7 +14,7 @@
             <slot></slot>
         </div>
         <div class="nut-swiper-pagination" v-show="paginationVisible">
-            <span class="swiper-pagination-bullet" :class="{'active':index+1 ===currentPage}" v-for="(slide,index) in slideEls" @click="paginationClickable && setPage(index+1)">
+            <span class="swiper-pagination-bullet" :class="{'active':index+1 ===currentPage}" v-for="(slide,index) in slideEls" @click="paginationClickable && setPage(index+1)" :key="index">
             </span>
         </div>
     </div>