Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tpl method gives error in laravel #170

Open
jsinhSolanki opened this issue Jul 18, 2019 · 2 comments
Open

tpl method gives error in laravel #170

jsinhSolanki opened this issue Jul 18, 2019 · 2 comments

Comments

@jsinhSolanki
Copy link

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

@halower
Copy link
Owner

halower commented Jul 18, 2019

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.

@5SMNOONMS5
Copy link

5SMNOONMS5 commented Nov 12, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants