From 4f896b909d99adc960c27ee1af4ee463536cd618 Mon Sep 17 00:00:00 2001 From: wayne <wayne8692wayne8692@gmail.com> Date: 星期四, 09 十二月 2021 14:48:03 +0800 Subject: [PATCH] [fix][todo 132169] 修正弱掃高風險 --- PAMapp/components/QuickFilter/QuickFilterConsultantList.vue | 34 ++++++++++++++++++++++++++++++---- 1 files changed, 30 insertions(+), 4 deletions(-) diff --git a/PAMapp/components/QuickFilter/QuickFilterConsultantList.vue b/PAMapp/components/QuickFilter/QuickFilterConsultantList.vue index 5549620..402eb5e 100644 --- a/PAMapp/components/QuickFilter/QuickFilterConsultantList.vue +++ b/PAMapp/components/QuickFilter/QuickFilterConsultantList.vue @@ -14,6 +14,8 @@ > <div class="fill" + @touchstart="moveStart" + @touchend="moveEnd" > <UiAvatar :size="200" @@ -64,8 +66,12 @@ > <div class="text--center mdTxt"> <p class="mb-50">{{popUpTxt}}</p> - <p class="text--primary cursor--pointer fix-chrome-click--issue" - @click="isVisiblePopUp = false">������</p> + <div class="text--center"> + <el-button + type="primary" + @click="isVisiblePopUp = false" + >������</el-button> + </div> </div> </PopUpFrame> @@ -75,13 +81,32 @@ <script lang="ts"> import { ElCarousel } from 'element-ui/types/carousel'; import { Vue, Component, Prop } from 'vue-property-decorator'; -import { Consultants } from '~/assets/ts/api/consultant'; +import { Consultant } from '~/assets/ts/models/consultant.model'; + @Component export default class QuickFilterConsultantList extends Vue { - @Prop() consultantList!: Consultants[]; + @Prop() consultantList!: Consultant[]; isVisiblePopUp = false; popUpTxt = '����憿批��'; + startPosition = 0; + endPosition = 0; + + moveStart(event: TouchEvent) { + this.startPosition = event.changedTouches[0].clientX; + } + + moveEnd(event: TouchEvent) { + this.endPosition = event.changedTouches[0].clientX; + if (this.endPosition < this.startPosition) { + this.nextCard(); + return; + } + + if (this.endPosition > this.startPosition) { + this.prevCard(); + } + } nextCard() { (this.$refs.carouselRef as ElCarousel).next(); @@ -95,6 +120,7 @@ this.popUpTxt = txt; this.isVisiblePopUp = true; } + showAgentDetail(agentNo: string): void { this.$router.push(`/agentInfo/${agentNo}`); } -- Gitblit v1.8.0