</Comp>`,
true
)
+
+ // #2564
+ assertDynamicSlots(
+ `<div v-for="i in list">
+ <Comp v-slot="bar"><button @click="fn(i)" /></Comp>
+ </div>`,
+ true
+ )
+
+ assertDynamicSlots(
+ `<div v-for="i in list">
+ <Comp v-slot="bar"><button @click="fn()" /></Comp>
+ </div>`,
+ false
+ )
})
test('named slot with v-if', () => {
// process the expression since it's been skipped
if (!__BROWSER__ && context.prefixIdentifiers) {
isInlineStatement && context.addIdentifiers(`$event`)
- exp = processExpression(exp, context, false, hasMultipleStatements)
+ exp = dir.exp = processExpression(
+ exp,
+ context,
+ false,
+ hasMultipleStatements
+ )
isInlineStatement && context.removeIdentifiers(`$event`)
// with scope analysis, the function is hoistable if it has no reference
// to scope variables.