Option 1: Use a handler method:
<template>
<component @input="emitInput" />
</template>
<script>
export default {
methods: {
emitInput(param1, param2) {
this.$emit('input', param1, param2);
},
},
}
</script>
Option 2: Use an inline function:
<template>
<component @input="(param1, param2) => $emit('input', param1, param2)" />
</template>
If using a render function, it will look like this:
render(createElement) {
return createElement(MyComponent, {
on: {
input: (param1, param2) => this.$emit('input', param1, param2),
},
});
Note: This method was inspired by Jacob Goh from his answer and subsequent comment to a similar question that I felt deserved its own question and answer.