Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/74.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/extjs/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript Tree VueDragable,无法将节点拖动到不带';我没有孩子_Javascript_Html_Vue.js_Tree_Drag - Fatal编程技术网

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 
    },