-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
feat(useDraggable): add stopPropagation option #1391
Conversation
DOM: Method:
ENV: Problem : |
<component
:is="draggable ? UseDraggable : 'div'"
class="logo"
:initialValue="{ top: '50%', right: 0 }"
:preventDefault="true"
:stopPropagation="true"
>
<img
width="120"
draggable="false"
src="xxxx.png"
@click.stop.prevent="$emit('open')"
/>
</component> 我使用usedraggable组件,当我释放鼠标时,也触发了click方法,但我已经设置了: I use the usedraggable component, when I release the mouse, triggered the click method too, but i already set : |
|
我已经将vueuse升级到了8.6.0 但是我这个还是不行 不过我用的不是组件的形式 而是像这样#1391 (comment) |
@webfansplz 像我这样还是不行 |
|
@DamonCais Because the stopProgation is resolve the draggable target element event bubbling. You can try this way to trigger custom click event instead of the native click. |
Description
Close #1386
Additional context
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).