-
-
Notifications
You must be signed in to change notification settings - Fork 9.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(SwipeCell): the click will be triggered after the touchend event on desktop #13040
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #13040 +/- ##
==========================================
- Coverage 89.66% 89.63% -0.03%
==========================================
Files 257 257
Lines 6985 6987 +2
Branches 1723 1724 +1
==========================================
Hits 6263 6263
- Misses 383 384 +1
- Partials 339 340 +1 ☔ View full report in Codecov by Sentry. |
@chenjiahan 4.9.4版本问题还存在, 并没有修复 |
@H-Sven 可以创建一个 codesandbox demo ,或者提供一个可以复现问题的最小化的 GitHub 仓库 |
这个链接访问不了,可能访问权限没有公开。 |
权限打开了, 你再试试 |
@H-Sven 可以使用 SwipeCell 组件的 click 事件替换 slot 内元素的 click 事件 |
点击其中一个item,触发了6次click, 而且右滑依然触发了click https://codesandbox.io/p/devbox/vant-swip-cell-demo-npqkx9?file=%2Fsrc%2FApp.vue |
可以通过参数区分触发点击的位置 https://vant-ui.github.io/vant/#/en-US/swipe-cell#events |
好的, 虽然能解决我的问题, 但是在v-for逻辑里面, click输出的内容看起来很怪异,我点击的是最后一个item, 但是却输出了其他item, 这应该存在问题吧? 如果我的list有非常多item的话 |
@H-Sven codesandbox 的 log 顺序不准,以浏览器控制台的 log 顺序为准 |
浏览器控制台的结果也是一样的, 我只点击了其中一个item, 但是却console.log()了所有的item 无论点击页面何处, 都会触发所有的item的 outside事件, 不知道是不是设计如此 |
是的设计如此,顾名思义,点击 SwipeCell 组件外面会触发 outside 事件 |
好的, 明白了。 感谢解答 |
fix #13037
Conflicts may need to be resolved after #13039 is merged.