vuedraggable 的自定义事件 @start 会导致 ghostClass 属性失效,这是什么原因造成的?

作者: niu-peng创建于 2025年3月21日更新于 2025年3月21日

start($event) { this.drag = true; } end($event) { this.drag = false; } .chosen { opacity: 1 !important; background: red !important; } .ghost { background: black !important; } In the above code, if the @start="start" event is not handled, the chosen-class will not work. I found that if the event is canceled, it will work.

内容来源: SortableJS/Vue.Draggable