Closed ghost closed 6 years ago
Hi. Thanks for your PR, however, I recommend to create an issue before you are going to add a new dependency to the project. For now, this project has no dependencies and for some developers, it is really important.
I prefer to keep the tree structure simple and serializable. That also allows to store the tree structure in a file or local-storage. If you need to have some additional UI handlers you can look at how show/hide
buttons are implemented in the demo example. If you want to attach some unserializable data for this component you can link it via data
property:
var extaFunctions = {
func1: () => { ... },
func2: () => { .... }
}
var nodes = [
{title: 'Item1', data: { extraFunction: 'func1' } },
{title: 'Item2', data: { extraFunction: 'func2' } },
]
You also can create your own wrapper-component for sl-vue-tree for things like this
Hello holiber. I am a beginner web developer.
because of here , functions of object vanish.
I used this module. https://www.npmjs.com/package/clone