refactor(compiler-core): remove unnecessary arg in cached handler codegen

This commit is contained in:
Evan You
2020-07-08 11:36:31 -04:00
parent 829b35e426
commit 4b5ce8b456
3 changed files with 7 additions and 11 deletions

View File

@@ -209,7 +209,7 @@ export function render(_ctx, _cache) {
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)))
})
])
]))

View File

@@ -400,11 +400,7 @@ describe('compiler: transform v-on', () => {
index: 1,
value: {
type: NodeTypes.COMPOUND_EXPRESSION,
children: [
`($event, ...args) => (`,
{ content: `_ctx.foo($event, ...args)` },
`)`
]
children: [`(...args) => (`, { content: `_ctx.foo(...args)` }, `)`]
}
})
})