fix(compiler-core): fix scope var reference check for v-on expressions
fix #2564
This commit is contained in:
@@ -521,6 +521,21 @@ describe('compiler: transform component slots', () => {
|
||||
</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', () => {
|
||||
|
||||
Reference in New Issue
Block a user