Javascript Tree VueDragable,无法将节点拖动到不带';我没有孩子
我无法将节点拖动到没有子节点的节点。它在我的嵌套树代码上运行良好:Javascript Tree VueDragable,无法将节点拖动到不带';我没有孩子,javascript,html,vue.js,tree,drag,Javascript,Html,Vue.js,Tree,Drag,我无法将节点拖动到没有子节点的节点。它在我的嵌套树代码上运行良好: <div class="child"> <draggable :list="trees.childs" :options="{animation: 200, group:'dragtree'}" :move="onMove" @end="onEnd">
<div class="child">
<draggable
:list="trees.childs"
:options="{animation: 200, group:'dragtree'}"
:move="onMove"
@end="onEnd">
<graph
v-if="open"
v-for="tree in trees.childs"
:key="tree.root"
:trees="tree">
</graph>
</draggable>
</div>
我面临着同样的问题,我面临着同样的问题。
onEnd:function(event){
this.D_related.childs.push({root : this.D_dragged.root, depth : this.D_related.depth+1, childs: this.D_dragged.childs})
},
onMove: function(event){
console.log("Move", event)
this.D_dragged = event.draggedContext.element
this.D_related = event.relatedContext.element
return
},