[Vuejs]-VueJS DOM issue

0👍

Looks like you’re just missing the empty tasks array. (and the draggable-nested issue mentioned by Roy)

if you define it for each object, you allow it to be moved in.


Updated code snippet for original jsfiddle example

<script type="text/x-template" id="template-drag">
  <draggable :element="'ul'" :list="tasks" class="draggable" :options="{group:{ name:'group'}}">
    <template v-for="el in children" :key="el.name">
      <p>{{el.name}}</p>
            <element-type :attrs="el"><draggable-nested :children="el.children"/></element-type>
    </template>
  </draggable>
</script>

Leave a comment