@@ -61,7 +61,7 @@ export function render(_ctx) {
61
61
` ;
62
62
63
63
exports [` v-on > event modifier 1` ] = `
64
- "import { delegate as _delegate , on as _on , delegateEvents as _delegateEvents , template as _template } from 'vue';
64
+ "import { withModifiers as _withModifiers , delegate as _delegate , on as _on , withKeys as _withKeys , delegateEvents as _delegateEvents , template as _template } from 'vue';
65
65
const t0 = _template("<a ></a >")
66
66
const t1 = _template("<form ></form >")
67
67
const t2 = _template("<div ></div >")
@@ -91,18 +91,10 @@ export function render(_ctx, $props, $emit, $attrs, $slots) {
91
91
const n19 = t3 ()
92
92
const n20 = t3 ()
93
93
const n21 = t3 ()
94
- _delegate (n0 , " click" , () => _ctx .handleEvent , {
95
- modifiers: [" stop" ]
96
- })
97
- _on (n1 , " submit" , () => _ctx .handleEvent , {
98
- modifiers: [" prevent" ]
99
- })
100
- _delegate (n2 , " click" , () => _ctx .handleEvent , {
101
- modifiers: [" stop" , " prevent" ]
102
- })
103
- _delegate (n3 , " click" , () => _ctx .handleEvent , {
104
- modifiers: [" self" ]
105
- })
94
+ _delegate (n0 , " click" , () => _withModifiers (_ctx .handleEvent , [" stop" ]))
95
+ _on (n1 , " submit" , () => _withModifiers (_ctx .handleEvent , [" prevent" ]))
96
+ _delegate (n2 , " click" , () => _withModifiers (_ctx .handleEvent , [" stop" ," prevent" ]))
97
+ _delegate (n3 , " click" , () => _withModifiers (_ctx .handleEvent , [" self" ]))
106
98
_on (n4 , " click" , () => _ctx .handleEvent , {
107
99
capture: true
108
100
})
@@ -112,53 +104,21 @@ export function render(_ctx, $props, $emit, $attrs, $slots) {
112
104
_on (n6 , " scroll" , () => _ctx .handleEvent , {
113
105
passive: true
114
106
})
115
- _delegate (n7 , " contextmenu" , () => _ctx .handleEvent , {
116
- modifiers: [" right" ]
117
- })
118
- _delegate (n8 , " click" , () => _ctx .handleEvent , {
119
- modifiers: [" left" ]
120
- })
121
- _delegate (n9 , " mouseup" , () => _ctx .handleEvent , {
122
- modifiers: [" middle" ]
123
- })
124
- _delegate (n10 , " contextmenu" , () => _ctx .handleEvent , {
125
- modifiers: [" right" ],
126
- keys: [" enter" ]
127
- })
128
- _delegate (n11 , " keyup" , () => _ctx .handleEvent , {
129
- keys: [" enter" ]
130
- })
131
- _delegate (n12 , " keyup" , () => _ctx .handleEvent , {
132
- keys: [" tab" ]
133
- })
134
- _delegate (n13 , " keyup" , () => _ctx .handleEvent , {
135
- keys: [" delete" ]
136
- })
137
- _delegate (n14 , " keyup" , () => _ctx .handleEvent , {
138
- keys: [" esc" ]
139
- })
140
- _delegate (n15 , " keyup" , () => _ctx .handleEvent , {
141
- keys: [" space" ]
142
- })
143
- _delegate (n16 , " keyup" , () => _ctx .handleEvent , {
144
- keys: [" up" ]
145
- })
146
- _delegate (n17 , " keyup" , () => _ctx .handleEvent , {
147
- keys: [" down" ]
148
- })
149
- _delegate (n18 , " keyup" , () => _ctx .handleEvent , {
150
- keys: [" left" ]
151
- })
152
- _delegate (n19 , " keyup" , () => _ctx .submit , {
153
- modifiers: [" middle" ]
154
- })
155
- _delegate (n20 , " keyup" , () => _ctx .submit , {
156
- modifiers: [" middle" , " self" ]
157
- })
158
- _delegate (n21 , " keyup" , () => _ctx .handleEvent , {
159
- modifiers: [" self" ],
160
- keys: [" enter" ]
161
- })
107
+ _delegate (n7 , " contextmenu" , () => _withModifiers (_ctx .handleEvent , [" right" ]))
108
+ _delegate (n8 , " click" , () => _withModifiers (_ctx .handleEvent , [" left" ]))
109
+ _delegate (n9 , " mouseup" , () => _withModifiers (_ctx .handleEvent , [" middle" ]))
110
+ _delegate (n10 , " contextmenu" , () => _withKeys (_withModifiers (_ctx .handleEvent , [" right" ]), [" enter" ]))
111
+ _delegate (n11 , " keyup" , () => _withKeys (_ctx .handleEvent , [" enter" ]))
112
+ _delegate (n12 , " keyup" , () => _withKeys (_ctx .handleEvent , [" tab" ]))
113
+ _delegate (n13 , " keyup" , () => _withKeys (_ctx .handleEvent , [" delete" ]))
114
+ _delegate (n14 , " keyup" , () => _withKeys (_ctx .handleEvent , [" esc" ]))
115
+ _delegate (n15 , " keyup" , () => _withKeys (_ctx .handleEvent , [" space" ]))
116
+ _delegate (n16 , " keyup" , () => _withKeys (_ctx .handleEvent , [" up" ]))
117
+ _delegate (n17 , " keyup" , () => _withKeys (_ctx .handleEvent , [" down" ]))
118
+ _delegate (n18 , " keyup" , () => _withKeys (_ctx .handleEvent , [" left" ]))
119
+ _delegate (n19 , " keyup" , () => _withModifiers (_ctx .submit , [" middle" ]))
120
+ _delegate (n20 , " keyup" , () => _withModifiers (_ctx .submit , [" middle" ," self" ]))
121
+ _delegate (n21 , " keyup" , () => _withKeys (_withModifiers (_ctx .handleEvent , [" self" ]), [" enter" ]))
162
122
return [n0 , n1 , n2 , n3 , n4 , n5 , n6 , n7 , n8 , n9 , n10 , n11 , n12 , n13 , n14 , n15 , n16 , n17 , n18 , n19 , n20 , n21 ]
163
123
} "
164
124
`;
@@ -315,44 +275,37 @@ export function render(_ctx) {
315
275
`;
316
276
317
277
exports[`v-on > should not wrap keys guard if no key modifier is present 1`] = `
318
- "import { delegate as _delegate , delegateEvents as _delegateEvents , template as _template } from 'vue';
278
+ "import { withModifiers as _withModifiers , delegate as _delegate , delegateEvents as _delegateEvents , template as _template } from 'vue';
319
279
const t0 = _template("<div ></div >", true)
320
280
_delegateEvents("keyup")
321
281
322
282
export function render(_ctx) {
323
283
const n0 = t0 ()
324
- _delegate (n0 , " keyup" , () => _ctx .test , {
325
- modifiers: [" exact" ]
326
- })
284
+ _delegate (n0 , " keyup" , () => _withModifiers (_ctx .test , [" exact" ]))
327
285
return n0
328
286
} "
329
287
`;
330
288
331
289
exports[`v-on > should support multiple events and modifiers options w/ prefixIdentifiers: true 1`] = `
332
- "import { delegate as _delegate , delegateEvents as _delegateEvents , template as _template } from 'vue';
290
+ "import { withModifiers as _withModifiers , delegate as _delegate , withKeys as _withKeys , delegateEvents as _delegateEvents , template as _template } from 'vue';
333
291
const t0 = _template("<div ></div >", true)
334
292
_delegateEvents("click", "keyup")
335
293
336
294
export function render(_ctx) {
337
295
const n0 = t0 ()
338
- _delegate (n0 , " click" , () => _ctx .test , {
339
- modifiers: [" stop" ]
340
- })
341
- _delegate (n0 , " keyup" , () => _ctx .test , {
342
- keys: [" enter" ]
343
- })
296
+ _delegate (n0 , " click" , () => _withModifiers (_ctx .test , [" stop" ]))
297
+ _delegate (n0 , " keyup" , () => _withKeys (_ctx .test , [" enter" ]))
344
298
return n0
345
299
} "
346
300
`;
347
301
348
302
exports[`v-on > should support multiple modifiers and event options w/ prefixIdentifiers: true 1`] = `
349
- "import { on as _on , template as _template } from 'vue';
303
+ "import { withModifiers as _withModifiers , on as _on , template as _template } from 'vue';
350
304
const t0 = _template("<div ></div >", true)
351
305
352
306
export function render(_ctx) {
353
307
const n0 = t0 ()
354
- _on (n0 , " click" , () => _ctx .test , {
355
- modifiers: [" stop" , " prevent" ],
308
+ _on (n0 , " click" , () => _withModifiers (_ctx .test , [" stop" ," prevent" ]), {
356
309
capture: true ,
357
310
once: true
358
311
})
@@ -361,29 +314,26 @@ export function render(_ctx) {
361
314
`;
362
315
363
316
exports[`v-on > should transform click.middle 1`] = `
364
- "import { delegate as _delegate , delegateEvents as _delegateEvents , template as _template } from 'vue';
317
+ "import { withModifiers as _withModifiers , delegate as _delegate , delegateEvents as _delegateEvents , template as _template } from 'vue';
365
318
const t0 = _template("<div ></div >", true)
366
319
_delegateEvents("mouseup")
367
320
368
321
export function render(_ctx) {
369
322
const n0 = t0 ()
370
- _delegate (n0 , " mouseup" , () => _ctx .test , {
371
- modifiers: [" middle" ]
372
- })
323
+ _delegate (n0 , " mouseup" , () => _withModifiers (_ctx .test , [" middle" ]))
373
324
return n0
374
325
} "
375
326
`;
376
327
377
328
exports[`v-on > should transform click.middle 2`] = `
378
- "import { on as _on , renderEffect as _renderEffect , template as _template } from 'vue';
329
+ "import { withModifiers as _withModifiers , on as _on , renderEffect as _renderEffect , template as _template } from 'vue';
379
330
const t0 = _template("<div ></div >", true)
380
331
381
332
export function render(_ctx) {
382
333
const n0 = t0 ()
383
334
_renderEffect (() => {
384
335
385
- _on (n0 , (_ctx .event ) === " click" ? " mouseup" : (_ctx .event ), () => _ctx .test , {
386
- modifiers: [" middle" ],
336
+ _on (n0 , (_ctx .event ) === " click" ? " mouseup" : (_ctx .event ), () => _withModifiers (_ctx .test , [" middle" ]), {
387
337
effect: true
388
338
})
389
339
})
@@ -392,30 +342,26 @@ export function render(_ctx) {
392
342
`;
393
343
394
344
exports[`v-on > should transform click.right 1`] = `
395
- "import { delegate as _delegate , delegateEvents as _delegateEvents , template as _template } from 'vue';
345
+ "import { withModifiers as _withModifiers , delegate as _delegate , delegateEvents as _delegateEvents , template as _template } from 'vue';
396
346
const t0 = _template("<div ></div >", true)
397
347
_delegateEvents("contextmenu")
398
348
399
349
export function render(_ctx) {
400
350
const n0 = t0 ()
401
- _delegate (n0 , " contextmenu" , () => _ctx .test , {
402
- modifiers: [" right" ]
403
- })
351
+ _delegate (n0 , " contextmenu" , () => _withModifiers (_ctx .test , [" right" ]))
404
352
return n0
405
353
} "
406
354
`;
407
355
408
356
exports[`v-on > should transform click.right 2`] = `
409
- "import { on as _on , renderEffect as _renderEffect , template as _template } from 'vue';
357
+ "import { withModifiers as _withModifiers , withKeys as _withKeys , on as _on , renderEffect as _renderEffect , template as _template } from 'vue';
410
358
const t0 = _template("<div ></div >", true)
411
359
412
360
export function render(_ctx) {
413
361
const n0 = t0 ()
414
362
_renderEffect (() => {
415
363
416
- _on (n0 , (_ctx .event ) === " click" ? " contextmenu" : (_ctx .event ), () => _ctx .test , {
417
- modifiers: [" right" ],
418
- keys: [" right" ],
364
+ _on (n0 , (_ctx .event ) === " click" ? " contextmenu" : (_ctx .event ), () => _withKeys (_withModifiers (_ctx .test , [" right" ]), [" right" ]), {
419
365
effect: true
420
366
})
421
367
})
@@ -436,16 +382,14 @@ export function render(_ctx) {
436
382
`;
437
383
438
384
exports[`v-on > should wrap both for dynamic key event w/ left/right modifiers 1`] = `
439
- "import { on as _on , renderEffect as _renderEffect , template as _template } from 'vue';
385
+ "import { withModifiers as _withModifiers , withKeys as _withKeys , on as _on , renderEffect as _renderEffect , template as _template } from 'vue';
440
386
const t0 = _template("<div ></div >", true)
441
387
442
388
export function render(_ctx) {
443
389
const n0 = t0 ()
444
390
_renderEffect (() => {
445
391
446
- _on (n0 , _ctx .e , () => _ctx .test , {
447
- modifiers: [" left" ],
448
- keys: [" left" ],
392
+ _on (n0 , _ctx .e , () => _withKeys (_withModifiers (_ctx .test , [" left" ]), [" left" ]), {
449
393
effect: true
450
394
})
451
395
})
@@ -466,30 +410,26 @@ exports[`v-on > should wrap in unref if identifier is setup-maybe-ref w/ inline:
466
410
`;
467
411
468
412
exports[`v-on > should wrap keys guard for keyboard events or dynamic events 1`] = `
469
- "import { on as _on , template as _template } from 'vue';
413
+ "import { withModifiers as _withModifiers , withKeys as _withKeys , on as _on , template as _template } from 'vue';
470
414
const t0 = _template("<div ></div >", true)
471
415
472
416
export function render(_ctx) {
473
417
const n0 = t0 ()
474
- _on (n0 , " keydown" , () => _ctx .test , {
475
- modifiers: [" stop" , " ctrl" ],
476
- keys: [" a" ],
418
+ _on (n0 , " keydown" , () => _withKeys (_withModifiers (_ctx .test , [" stop" ," ctrl" ]), [" a" ]), {
477
419
capture: true
478
420
})
479
421
return n0
480
422
} "
481
423
`;
482
424
483
425
exports[`v-on > should wrap keys guard for static key event w/ left/right modifiers 1`] = `
484
- "import { delegate as _delegate , delegateEvents as _delegateEvents , template as _template } from 'vue';
426
+ "import { withKeys as _withKeys , delegate as _delegate , delegateEvents as _delegateEvents , template as _template } from 'vue';
485
427
const t0 = _template("<div ></div >", true)
486
428
_delegateEvents("keyup")
487
429
488
430
export function render(_ctx) {
489
431
const n0 = t0 ()
490
- _delegate (n0 , " keyup" , () => _ctx .test , {
491
- keys: [" left" ]
492
- })
432
+ _delegate (n0 , " keyup" , () => _withKeys (_ctx .test , [" left" ]))
493
433
return n0
494
434
} "
495
435
`;
0 commit comments