vue-treeview
vue-treeview copied to clipboard
Support click event
Hi, thanks for the great work! I would like to use it for showing a file tree but I will need the click event. Do you have plan to support that? It would be even better if you support slot
so I can add the click event myself.
Hey!
Can you clarify what you want to do with the @click
event? Currently the click event is used for navigation purpose.
Implementing slot
would take some time since the tree is generated from the data you supply to the plugin.
Yes, I would like to display a file tree, when the user click on the file or folder name, a function that fetches more details about the file or folder will be called.
For the slot
, I would like to plug-in a template, and depending on the type
key or name
of the nodes, I will render them differently. For example, it is an image file (ends with extension .jpg, .png etc.), I will show an image icon and call a display image function when double clicked.
Currently, you can do something similar to what you want, if you take a look at router, tree, and application. This should be able to display a file (image), with the link from the tree.
Currently, you can do something similar to what you want, if you take a look at router, tree, and application. This should be able to display a file (image), with the link from the tree.
I have already checked it before, but the issue is that I cannot implement them as a route, it has to be a straight function call.