holiber / sl-vue-tree

Customizable draggable tree component for Vue.js
https://holiber.github.io/sl-vue-tree/
MIT License
345 stars 78 forks source link

How to Add Node on Empty Tree #99

Open fin-k opened 3 years ago

fin-k commented 3 years ago

Hi,

I know how to insert node to tree.

var lastNode = this.$refs.slVueTree.getLastNode();
this.$refs.slVueTree.insert(
      { 
        node: lastNode,
        placement: 'after'
      }
      , 
      { title: 'Node Test'}
);

But how can we insert node on empty tree? What object we must put on position params?