return (_openBlock(), _createBlock(\\"div\\", null, [
_createVNode(\\"div\\", null, [
_createVNode(\\"div\\", {
- onClick: _cache[1] || (_cache[1] = $event => (_ctx.foo($event)))
+ onClick: _cache[1] || (_cache[1] = ($event, ...args) => (_ctx.foo($event, ...args)))
})
])
]))
key: { content: `onClick` },
value: {
type: NodeTypes.COMPOUND_EXPRESSION,
- children: [`$event => (`, { content: `i++` }, `)`]
+ children: [`($event, ...args) => (`, { content: `i++` }, `)`]
}
}
]
// should wrap with `{` for multiple statements
// in this case the return value is discarded and the behavior is
// consistent with 2.x
- children: [`$event => {`, { content: `foo();bar()` }, `}`]
+ children: [
+ `($event, ...args) => {`,
+ { content: `foo();bar()` },
+ `}`
+ ]
}
}
]
value: {
type: NodeTypes.COMPOUND_EXPRESSION,
children: [
- `$event => (`,
+ `($event, ...args) => (`,
{
type: NodeTypes.COMPOUND_EXPRESSION,
children: [
value: {
type: NodeTypes.COMPOUND_EXPRESSION,
children: [
- `$event => {`,
+ `($event, ...args) => {`,
{
children: [
{ content: `_ctx.foo` },
index: 1,
value: {
type: NodeTypes.COMPOUND_EXPRESSION,
- children: [`$event => (`, { content: `_ctx.foo($event)` }, `)`]
+ children: [
+ `($event, ...args) => (`,
+ { content: `_ctx.foo($event, ...args)` },
+ `)`
+ ]
}
})
})
value: {
type: NodeTypes.COMPOUND_EXPRESSION,
children: [
- `$event => (`,
+ `($event, ...args) => (`,
{ children: [{ content: `_ctx.foo` }, `++`] },
`)`
]
// avoiding the need to be patched.
if (isCacheable && isMemberExp) {
if (exp.type === NodeTypes.SIMPLE_EXPRESSION) {
- exp.content += `($event)`
+ exp.content += `($event, ...args)`
} else {
- exp.children.push(`($event)`)
+ exp.children.push(`($event, ...args)`)
}
}
}
if (isInlineStatement || (isCacheable && isMemberExp)) {
// wrap inline statement in a function expression
exp = createCompoundExpression([
- `$event => ${hasMultipleStatements ? `{` : `(`}`,
+ `($event, ...args) => ${hasMultipleStatements ? `{` : `(`}`,
exp,
hasMultipleStatements ? `}` : `)`
])