fix(compiler-core): should generate HYDRATE_EVENTS flag on dynamic component that resolves to element
fix #5870
This commit is contained in:
@@ -1053,6 +1053,21 @@ describe('compiler: element transform', () => {
|
||||
genFlagText([PatchFlags.PROPS, PatchFlags.HYDRATE_EVENTS])
|
||||
)
|
||||
})
|
||||
|
||||
// #5870
|
||||
test('HYDRATE_EVENTS on dynamic component', () => {
|
||||
const { node } = parseWithElementTransform(
|
||||
`<component :is="foo" @input="foo" />`,
|
||||
{
|
||||
directiveTransforms: {
|
||||
on: transformOn
|
||||
}
|
||||
}
|
||||
)
|
||||
expect(node.patchFlag).toBe(
|
||||
genFlagText([PatchFlags.PROPS, PatchFlags.HYDRATE_EVENTS])
|
||||
)
|
||||
})
|
||||
})
|
||||
|
||||
describe('dynamic component', () => {
|
||||
|
||||
Reference in New Issue
Block a user