vue-tree
vue-tree copied to clipboard
tpl method gives error in laravel
Hello, Thanks for great tree component. I used your demo for laravel project. I copied this code, and pasted in my laravel project. This is giving me error in my laravel project as follow.
134 | let titleClass = node.selected ? 'node-title node-selected' : 'node-title'
135 | if (node.searched) titleClass += ' node-searched'
> 136 | return <span>
| ^
137 | <span class="tree-expand" onClick={() => this.$refs.tree.addNode(node, {title: 'sync node'})}>+</span>
138 | <span class={titleClass} domPropsInnerHTML={node.title} onClick={() => {
139 | this.$refs.tree.nodeSelected(node)
at Parser.raise
However above code works fine if I only use VueJS. Can you please help me with this.
~ Thanks
it’s a shame, mainly because we are not familiar with PHP
, so i don't know how to install the corresponding plugin(maybe, etc transform-vue-jsx
) to supprot syntax of jsx, ([email protected]), it my email ,if you need further communication, can contact me.
Maybe a little late I have same problem with same environment using Laravel and Vue2 finally here is my workaround
<v-tree ref="tree"
:canDeleteRoot="false"
:data="treeData2"
:draggable="true"
:multiple="true"
:tpl="tpl" <<<<<< do not use tpl
/>
Put your html code inside your tree data
title: 'node 1-1-3 <h1>title</h1>'
This require you deal with your tree data first.