Alfred-Skyblue / vue-draggable-plus

Universal Drag-and-Drop Component Supporting both Vue 3 and Vue 2
https://vue-draggable-plus.pages.dev/en/
MIT License
2.71k stars 106 forks source link

suggestion: add a class for aviod dragging #131

Open Ben-Avrahami opened 2 months ago

Ben-Avrahami commented 2 months ago

for exmaple i have a card that has many components inside it. i want the whole card beside lets say a button and a images to be able start initiate dragging, so if i give the whole card the drag handle class, then also the btn and image will initiate dragging. i whould like to have a class that i can give them that will let VueDraggable to know that items that have this class cannot initate a drag event.

flower0wine commented 1 month ago

你可以使用 filter 这个属性。下面我给出了一个示例,关于这个属性的简单例子,不知你的想法是否是这个。 示例 @Ben-Avrahami