return (_openBlock(), _createBlock(\\"div\\", null, [
_createVNode(\\"div\\", null, [
_createVNode(\\"div\\", {
- onClick: _cache[1] || (_cache[1] = ($event, ...args) => (_ctx.foo($event, ...args)))
+ onClick: _cache[1] || (_cache[1] = (...args) => (_ctx.foo(...args)))
})
])
]))
index: 1,
value: {
type: NodeTypes.COMPOUND_EXPRESSION,
- children: [
- `($event, ...args) => (`,
- { content: `_ctx.foo($event, ...args)` },
- `)`
- ]
+ children: [`(...args) => (`, { content: `_ctx.foo(...args)` }, `)`]
}
})
})
// process the expression since it's been skipped
if (!__BROWSER__ && context.prefixIdentifiers) {
- context.addIdentifiers(`$event`)
+ isInlineStatement && context.addIdentifiers(`$event`)
exp = processExpression(exp, context, false, hasMultipleStatements)
- context.removeIdentifiers(`$event`)
+ isInlineStatement && context.removeIdentifiers(`$event`)
// with scope analysis, the function is hoistable if it has no reference
// to scope variables.
isCacheable =
// avoiding the need to be patched.
if (isCacheable && isMemberExp) {
if (exp.type === NodeTypes.SIMPLE_EXPRESSION) {
- exp.content += `($event, ...args)`
+ exp.content += `(...args)`
} else {
- exp.children.push(`($event, ...args)`)
+ exp.children.push(`(...args)`)
}
}
}
if (isInlineStatement || (isCacheable && isMemberExp)) {
// wrap inline statement in a function expression
exp = createCompoundExpression([
- `${isInlineStatement ? `$event` : `($event, ...args)`} => ${
+ `${isInlineStatement ? `$event` : `(...args)`} => ${
hasMultipleStatements ? `{` : `(`
}`,
exp,