fix(compiler-core): generate NEED_PATCH flag for element with vnode hooks
This commit is contained in:
@@ -780,6 +780,11 @@ describe('compiler: element transform', () => {
|
||||
expect(node.patchFlag).toBe(genFlagText(PatchFlags.NEED_PATCH))
|
||||
})
|
||||
|
||||
test('NEED_PATCH (vnode hooks)', () => {
|
||||
const { node } = parseWithBind(`<div @vnodeUpdated="foo" />`)
|
||||
expect(node.patchFlag).toBe(genFlagText(PatchFlags.NEED_PATCH))
|
||||
})
|
||||
|
||||
test('HYDRATE_EVENTS', () => {
|
||||
// ignore click events (has dedicated fast path)
|
||||
const { node } = parseWithElementTransform(`<div @click="foo" />`, {
|
||||
|
||||
Reference in New Issue
Block a user