From 5f6a7a130a3e3ec35d39a9052ec435838a018500 Mon Sep 17 00:00:00 2001 From: DCloud_LXH <283700113@qq.com> Date: Fri, 16 Sep 2022 17:06:07 +0800 Subject: [PATCH] chore(h5): swiper navigation click event stopPropagation --- src/core/view/components/swiper/index.vue | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/core/view/components/swiper/index.vue b/src/core/view/components/swiper/index.vue index ec004f973..058175f8c 100644 --- a/src/core/view/components/swiper/index.vue +++ b/src/core/view/components/swiper/index.vue @@ -635,7 +635,9 @@ export default { this.circularEnabled ? 1 : 0 ) }, - _navigationClick (type) { + _navigationClick ($event, type) { + $event.stopPropagation() + const swiperItemLength = this.items.length let _current = this.currentSync @@ -783,7 +785,7 @@ export default { 'div', { on: { - click: () => this._navigationClick('prev'), + click: (e) => this._navigationClick(e, 'prev'), ...navigationEvent }, class: [ @@ -801,7 +803,7 @@ export default { 'div', { on: { - click: () => this._navigationClick('next'), + click: (e) => this._navigationClick(e, 'next'), ...navigationEvent }, class: [ -- GitLab