Skip to content

Conversation

simplesmiler
Copy link
Member

Proposed fix for #2657

@@ -41,6 +41,15 @@ export default function FragmentFactory (vm, el) {
this.linker = linker
}

function hasDirectives (el) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this could be simpler, since v-for and v-if are the only ones that can work on <template>, and v-for has higher priority than v-if, it seems v-if is the only thing that we need to check.

@paulpflug
Copy link

I'm unsure if this relates: while working on #2619, I noticed, that v-for is evaluated before slot, besides the priority says otherwise.
Could have the same origin? (although it is handy to have v-for before slot)

@simplesmiler
Copy link
Member Author

@paulpflug are you talking about something like <slot v-for="...">? I don't think it's related, no.

@paulpflug
Copy link

@simplesmiler fine. It just attracted my attention that in both cases priorities don't work (the way I understand them 😄)

@simplesmiler
Copy link
Member Author

@paulpflug this one has to do with the fact that <template> loses all attributes when being turned into a fragment factory 😉

@simplesmiler simplesmiler changed the title Fix handling multiple directives on a template tag Fix handling v-if along with v-for on a template tag Apr 13, 2016
@yyx990803 yyx990803 merged commit f28260a into vuejs:dev Apr 13, 2016
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

Successfully merging this pull request may close these issues.

3 participants