Adding custom data or objects on node
pvrsouza opened this issue · comments
Pablo Souza commented
is it possible to create custom fields to store extra information? For example:
...
children: [
{
text: "Custom Data",
selected: false,
children: [
{
text: "Incluir",
disabled: true,
customdata: {
url: "http://someurl.com"
}
},
],
customdata: {
url: "http://someurl.com"
}
}
]
And I would like it to be possible to have access to this information at events, like this:
...
methods: {
itemClick(node, item, e) {
console.log(item.customdata.url); //or node.customdata.url
}
},...