halower / vue-tree

tree and multi-select component based on Vue.js 2.0
https://github.com/halower/vue2-tree/blob/master/README.md
MIT License
935 stars 209 forks source link

Expand icon on every non-leaf element? #181

Closed MarekDzw closed 4 years ago

MarekDzw commented 4 years ago

Hi, Is there any option to set expand icon on every non-leaf element even when item has: children: [ <empty array>] EDIT: Found solution. Everything is done here, now I will edit source code to make it suits my needs!

  hasChildren() {
      const item = this.item;
      return item.children && item.children.length > 0;
    },