Skip to content
Advertisement

VueJs dynamic v-on event possible?

Is it possible to set dynamic on event in VueJS? I try to build a dynamic form as component with inputs that can listen on everything. Here an example:

JavaScript
JavaScript

Is it possible to set a dynamic v-on event like v-on="<variable>:<function>"?

Advertisement

Answer

From Vue 2.4.0+, v-on accepts an object syntax

Refer this documentation

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement