phphe/he-tree-vue

Demo3Fold.vue not working in vue 3

bci24 opened this issue · 1 comments

bci24 commented

I have tried this example in vue 3 (exactly like in the example)

https://github.com/phphe/he-tree-vue-docs/blob/master/docs/.vuepress/components/Demo3Fold.vue

with no success.

TypeError: Cannot read properties of undefined (reading '$folded')

I have tried without the <b> tag and let only {{ node.text }}

TypeError: Cannot read properties of undefined (reading 'text')

Am I missing something ?

bci24 commented

it seems the the v-slot it should not be in the span like in the example. It should be attached directly to Tree

<Tree :value="treeData" :indent="40" v-slot="{node, index, path, tree}">
  // content
</Tree>

Now it works...