|
|
@@ -3,11 +3,12 @@
|
|
|
width: winWidth + 'px',
|
|
|
height: winHeigh + 'px',
|
|
|
}">
|
|
|
+<!-- @touchstart.capture="touchStart($event,currentIndex)"-->
|
|
|
+ <view
|
|
|
|
|
|
- <view @touchstart.capture="touchStart($event,currentIndex)"
|
|
|
@touchmove.stop.capture="touchMove($event,currentIndex)"
|
|
|
@touchend.capture="touchEnd(currentIndex)"
|
|
|
- @longpress="longPress"
|
|
|
+ @longpress="longPress($event,currentIndex)"
|
|
|
class="tantan-slide-box">
|
|
|
<template v-for="(item, index) in list">
|
|
|
<view class="tantan-slide-box-item"
|
|
|
@@ -22,7 +23,7 @@
|
|
|
<!-- 加载图片会闪屏 双if避免 -->
|
|
|
<template v-if="currentIndex + visible >= index && currentIndex <= index">
|
|
|
<view :animation="animationData" class="tantan-slide-img-box" :style="{height: winHeigh + 'px'}">
|
|
|
- <scroll-view class="tantan-slide-img-scroll-box" :scroll-y="!ifLongTap" :style="{height: winHeigh + 'px'}">
|
|
|
+ <scroll-view class="tantan-slide-img-scroll-box" :bindscroll="endScroll" :scroll-y="!ifLongTap" :style="{height: winHeigh + 'px'}">
|
|
|
<view class="img-list">
|
|
|
<image class="tantan-slide-img" v-show="imgIndex===imgKey" v-for="(img,imgIndex) in item.images" :style="{height: winHeigh + 'px'}" mode="aspectFill" :src="img" ></image>
|
|
|
</view>
|
|
|
@@ -227,9 +228,13 @@
|
|
|
}
|
|
|
return css
|
|
|
},
|
|
|
- longPress(){
|
|
|
+ endScroll(){
|
|
|
+ console.log('滚动结束')
|
|
|
+ },
|
|
|
+ longPress(e, index){
|
|
|
this.ifLongTap=true
|
|
|
tools.vibrate()
|
|
|
+ this.touchStart(e, index)
|
|
|
},
|
|
|
touchStart(e, index) {
|
|
|
|
|
|
@@ -254,6 +259,7 @@
|
|
|
this.x.move = e.touches[0].pageX;
|
|
|
this.y.move = e.touches[0].pageY;
|
|
|
console.log('this.x.start:'+this.x.start+'this.x.move:'+this.x.move)
|
|
|
+ console.log('this.y.start:'+this.y.start+'this.y.move:'+this.y.move)
|
|
|
|
|
|
|
|
|
|