-
Notifications
You must be signed in to change notification settings - Fork 25
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
add slot key #10
add slot key #10
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, could you add a unit test or 2 conveying the use case of this?
@jackmellis I made a demo here: https://jsfiddle.net/2by06fvt/1/ . The problem is using the In VUE's |
Yes I think I understand what problem this is solving (many thanks btw). But I would like to have these solutions fully unit tested so there is an audit of all of the handled scenarios within the codebase. |
OK, I'll find a time to add some unit tests. |
Thanks dude |
…he two adjacent text nodes with different slot prop merged by `normalizeArrayChildren` method in VUE.
@jackmellis I found that the But I do not find out why the previous |
Because Vuenit also uses |
Ah I think I get it. |
Could you add mount(Component) to line 11 of the test file. It's a little bit of a hack but it should work. |
It works. |
The
resolveSlots
method in VUE has aif
condition: https://github.com/vuejs/vue/blob/684cd7d21aa7cb9a40fb4a8542c4e08fb3801a86/src/core/instance/render-helpers/resolve-slots.js#L24So we should add slot key for slot vnodes.