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