Skip to content

Commit 60a554c

Browse files
committed
chore: update
1 parent ee324fb commit 60a554c

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed
Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
22

3-
exports[`compiler-dom: transform v-on > should wrap both for dynamic key event w/ once modifiers 1`] = `
3+
exports[`compiler-dom: transform v-on > should wrap both for dynamic key event w/ event modifiers 1`] = `
44
"const _Vue = Vue
55
66
return function render(_ctx, _cache) {
77
with (_ctx) {
8-
const { toHandlerKey: _toHandlerKey, checkDynamicEvent: _checkDynamicEvent, openBlock: _openBlock, createElementBlock: _createElementBlock } = _Vue
8+
const { toHandlerKey: _toHandlerKey, checkDynamicEvent: _checkDynamicEvent, createElementVNode: _createElementVNode, Fragment: _Fragment, openBlock: _openBlock, createElementBlock: _createElementBlock } = _Vue
99
10-
return (_openBlock(), _createElementBlock("div", { [_checkDynamicEvent(_toHandlerKey(e),"Once")]: test }, null, 16 /* FULL_PROPS */))
10+
return (_openBlock(), _createElementBlock(_Fragment, null, [
11+
_createElementVNode("div", { [_checkDynamicEvent(_toHandlerKey(e),"Once")]: test }, null, 16 /* FULL_PROPS */),
12+
_createElementVNode("div", { [_checkDynamicEvent(_toHandlerKey(e),"Passive")]: test }, null, 16 /* FULL_PROPS */),
13+
_createElementVNode("div", { [_checkDynamicEvent(_toHandlerKey(e),"Capture")]: test }, null, 16 /* FULL_PROPS */)
14+
], 64 /* STABLE_FRAGMENT */))
1115
}
1216
}"
1317
`;

packages/compiler-dom/__tests__/transforms/vOn.spec.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,10 @@ describe('compiler-dom: transform v-on', () => {
169169
})
170170
})
171171

172-
it('should wrap both for dynamic key event w/ once modifiers', () => {
173-
const { root: ast } = parseWithVOn(`<div @[e].once="test"/>`)
172+
it('should wrap both for dynamic key event w/ event modifiers', () => {
173+
const { root: ast } = parseWithVOn(
174+
`<div @[e].once="test"/><div @[e].passive="test"/><div @[e].capture="test"/>`,
175+
)
174176

175177
expect(generate(ast).code).toMatchSnapshot()
176178
})

0 commit comments

Comments
 (0)