删除内容数据处理

This commit is contained in:
于肖磊
2026-05-20 15:04:13 +08:00
parent fbdc1484c3
commit c490676d8f
2 changed files with 28 additions and 1 deletions

View File

@ -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) {
// 向下滑动,切换到上一个

View File

@ -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)