mirror of
https://gitee.com/zongzhige/shopxo-uniapp.git
synced 2026-06-05 18:25:48 +08:00
删除内容数据处理
This commit is contained in:
@ -859,6 +859,20 @@
|
||||
handle_swiper_touch_end(e) {
|
||||
try {
|
||||
const move_distance = this.swiper_current_y - this.swiper_start_y;
|
||||
|
||||
// 如果滑动距离小于10px,不触发切换提示
|
||||
if (Math.abs(move_distance) < 10) {
|
||||
// 清理节流定时器
|
||||
if (this.swiper_move_throttle_timer) {
|
||||
clearTimeout(this.swiper_move_throttle_timer);
|
||||
this.swiper_move_throttle_timer = null;
|
||||
}
|
||||
// 重置拖拽状态
|
||||
this.swiper_start_y = 0;
|
||||
this.swiper_current_y = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
// 只有滑动距离超过屏幕高度的 15% 才触发切换
|
||||
if (move_distance > 0) {
|
||||
// 向下滑动,切换到上一个
|
||||
|
||||
@ -112,8 +112,14 @@ export default {
|
||||
if(e.state === 'end') {
|
||||
this.touchType = null
|
||||
|
||||
//上下
|
||||
//上下滑动判断 - 添加最小滑动距离判断(小于10px不计入)
|
||||
if(move==0&& this.distanceX==0&& Math.abs(e.deltaY)>this.startDistance){
|
||||
// 如果滑动距离小于10px,不触发切换
|
||||
if(Math.abs(e.deltaY) < 10) {
|
||||
this.play_current_video_safely(this.index);
|
||||
return;
|
||||
}
|
||||
|
||||
let newTime = new Date()
|
||||
let quickMove = newTime.getTime() - this.oldTime.getTime() <= this.minTime ? true:false
|
||||
|
||||
@ -132,7 +138,14 @@ export default {
|
||||
this.bindTiming(distance,e.deltaY,quickMove)
|
||||
}
|
||||
|
||||
//左右滑动判断 - 添加最小滑动距离判断(小于10px不计入)
|
||||
if(move!=0&& move*this.distanceX<=0&& e.deltaX*this.distanceX<=0&& Math.abs(e.deltaX)>this.startDistance){
|
||||
// 如果滑动距离小于10px,不触发切换
|
||||
if(Math.abs(e.deltaX) < 10) {
|
||||
this.play_current_video_safely(this.index);
|
||||
return;
|
||||
}
|
||||
|
||||
const distance = this.distanceX + e.deltaX
|
||||
|
||||
this.bindTimingX(distance,e.deltaX)
|
||||
|
||||
Reference in New Issue
Block a user