vue.js - The `render` function is not replacing slot content -


i using vue 2.0.

i want generate template:

<poptip placement="right" width="400">     <button type="ghost">click 激活</button>     <div class="api" slot="content">my content</div> </poptip> 

using render function:

render: (h, params) => {   return h('poptip', {     props: {       placement: 'right'     }   }, [h('button', {   props: {     type: 'ghost'     }   }, 'edit'), h('div', {     props: {       slot: 'content'     }   }, 'my content')]) } 

using template works perfectly. but, when use render function, slot's content not replaced content.

you specifing prop named slot value content:

h('div', {   props: {     slot: 'content'   } }, 'my content') 

to specify slot named content:

h('div', {   slot: 'content' }, 'my content') 

see documentation.


Comments

Popular posts from this blog

What is happening when Matlab is starting a "parallel pool"? -

angular - DownloadURL return null in below code -

php - Cannot override Laravel Spark authentication with own implementation -