You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
QingWei-Li
changed the title
[2.0.0-rc1] Components are not rendered properly when passed to a v-for component via slot
[2.0.0-rc.1] Components are not rendered properly when passed to a v-for component via slot
Aug 15, 2016
This is a wontfix - consider this a breaking change from 1.x.
The <span> example will also be fixed as it is not supposed to work.
The reason is that in 2.0, this is the same as using the same vnode multiple times in the same render tree, something that is not supported by the vdom patching algorithm. To put it another way: the same slot cannot be rendered more than once in the same template.
On the other hand, why would you want to render the exact same thing multiple times? In most cases, you want to render a list of things using different data. There's no way to pass data into slot content, so I'm not if this use case makes sense at all.
I can see that you are trying to build an options component, the better way to do it is render the list of child components in the parent scope:
<options><my-optionv-for="o in options" :data="o"></my-option></options>
Vue.js version
2.0.0-rc1
Reproduction Link
https://jsbin.com/fadise/edit?html,js,output
Steps to reproduce
What is Expected?
What is actually happening?
The text was updated successfully, but these errors were encountered: