From 6ab4715b98cdd008edc6f16bdd0a70c9aff0c7c3 Mon Sep 17 00:00:00 2001 From: "Mohammad M. Shahbazi" Date: Sat, 31 Oct 2020 16:18:14 +0330 Subject: [PATCH] fix: handle additional args in components' with event modifiers Additional args are not passed to the component's events with modifiers. with a component template like this `` triggering the event, e.g. `` the `onMyKeyup` receives the `$event`, but not `var1` and `var2` hope this PR resolves the issue. --- packages/vue-template-compiler/build.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/vue-template-compiler/build.js b/packages/vue-template-compiler/build.js index e76e16c823b..f420dc262ab 100644 --- a/packages/vue-template-compiler/build.js +++ b/packages/vue-template-compiler/build.js @@ -3836,9 +3836,9 @@ function genHandler (handler) { code += genModifierCode; } var handlerCode = isMethodPath - ? ("return " + (handler.value) + "($event)") + ? ("return " + (handler.value) + ".apply(null, arguments") : isFunctionExpression - ? ("return (" + (handler.value) + ")($event)") + ? ("return (" + (handler.value) + ").apply(null, arguments") : isFunctionInvocation ? ("return " + (handler.value)) : handler.value;