@@ -142,7 +142,7 @@ describe('compiler: transform v-on', () => {
142
142
key : { content : `onClick` } ,
143
143
value : {
144
144
type : NodeTypes . COMPOUND_EXPRESSION ,
145
- children : [ `$event => (` , { content : `i++` } , `)` ]
145
+ children : [ `( $event, ...args) => (` , { content : `i++` } , `)` ]
146
146
}
147
147
}
148
148
]
@@ -160,7 +160,11 @@ describe('compiler: transform v-on', () => {
160
160
// should wrap with `{` for multiple statements
161
161
// in this case the return value is discarded and the behavior is
162
162
// consistent with 2.x
163
- children : [ `$event => {` , { content : `foo();bar()` } , `}` ]
163
+ children : [
164
+ `($event, ...args) => {` ,
165
+ { content : `foo();bar()` } ,
166
+ `}`
167
+ ]
164
168
}
165
169
}
166
170
]
@@ -196,7 +200,7 @@ describe('compiler: transform v-on', () => {
196
200
value : {
197
201
type : NodeTypes . COMPOUND_EXPRESSION ,
198
202
children : [
199
- `$event => (` ,
203
+ `( $event, ...args) => (` ,
200
204
{
201
205
type : NodeTypes . COMPOUND_EXPRESSION ,
202
206
children : [
@@ -226,7 +230,7 @@ describe('compiler: transform v-on', () => {
226
230
value : {
227
231
type : NodeTypes . COMPOUND_EXPRESSION ,
228
232
children : [
229
- `$event => {` ,
233
+ `( $event, ...args) => {` ,
230
234
{
231
235
children : [
232
236
{ content : `_ctx.foo` } ,
@@ -400,7 +404,11 @@ describe('compiler: transform v-on', () => {
400
404
index : 1 ,
401
405
value : {
402
406
type : NodeTypes . COMPOUND_EXPRESSION ,
403
- children : [ `$event => (` , { content : `_ctx.foo($event)` } , `)` ]
407
+ children : [
408
+ `($event, ...args) => (` ,
409
+ { content : `_ctx.foo($event, ...args)` } ,
410
+ `)`
411
+ ]
404
412
}
405
413
} )
406
414
} )
@@ -444,7 +452,7 @@ describe('compiler: transform v-on', () => {
444
452
value : {
445
453
type : NodeTypes . COMPOUND_EXPRESSION ,
446
454
children : [
447
- `$event => (` ,
455
+ `( $event, ...args) => (` ,
448
456
{ children : [ { content : `_ctx.foo` } , `++` ] } ,
449
457
`)`
450
458
]
0 commit comments