From 2ca1a76c216ad83d14121519478b8453b14f9b58 Mon Sep 17 00:00:00 2001 From: Mila <Mila@pollex.com.tw> Date: 星期五, 10 十二月 2021 11:10:21 +0800 Subject: [PATCH] fixed TODO#132097 快速篩選滑動顧問時會觸發頁面上下滑動 --- PAMapp/components/QuickFilter/QuickFilterConsultantList.vue | 18 ++++++++++++------ 1 files changed, 12 insertions(+), 6 deletions(-) diff --git a/PAMapp/components/QuickFilter/QuickFilterConsultantList.vue b/PAMapp/components/QuickFilter/QuickFilterConsultantList.vue index 402eb5e..93250cd 100644 --- a/PAMapp/components/QuickFilter/QuickFilterConsultantList.vue +++ b/PAMapp/components/QuickFilter/QuickFilterConsultantList.vue @@ -91,20 +91,26 @@ popUpTxt = '����憿批��'; startPosition = 0; endPosition = 0; + startYPosition = 0; + endYPosition = 0; moveStart(event: TouchEvent) { this.startPosition = event.changedTouches[0].clientX; + this.startYPosition = event.changedTouches[0].clientY; } moveEnd(event: TouchEvent) { this.endPosition = event.changedTouches[0].clientX; - if (this.endPosition < this.startPosition) { - this.nextCard(); - return; - } + this.endYPosition = event.changedTouches[0].clientY; + if (Math.abs(this.endYPosition - this.startYPosition) < 50) { + if (this.endPosition < this.startPosition) { + this.nextCard(); + return; + } - if (this.endPosition > this.startPosition) { - this.prevCard(); + if (this.endPosition > this.startPosition) { + this.prevCard(); + } } } -- Gitblit v1.8.0