-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
v-with
fails silently if component has replace: true
and more than 1 root element
#655
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
Comments
@Cyancat I'm not sure I understand what you're trying to do here, can you explain what a "multi root template" is exactly? I don't see any reason why you would want to set a data property on a view model and then use v-with to override that value when there is many other ways you can do that. |
@agonbina About "multi root template": Here have a complicated example which include all cases, which you could see the different caused by the structure of template. |
This is actually because: when the template contains more than one node, the component becomes a "block component", which means it doesn't have a root node (but rather a DocumentFragment). So directives that were attached to the placeholder like |
v-with
fails silently if component has replace: true
and more than 1 root element
+1 for a fix on this, I've recently run into this myself. As a workaround, I'm utilising |
Fixed! |
@yyx990803 |
See this: http://jsfiddle.net/qm2wqg8u/5/
If replace set to true, and a multi root template could cause the param can't pass into component. In this case, the comment block cause the problem.
The text was updated successfully, but these errors were encountered: