Answer the question
In order to leave comments, you need to log in
How to track multiple events on a component?
The crux of the matter is, there is a Root element, it has a component that generates many events and changes the state of the Root,
<user-form v-bind:formprops='userProps' @is-active="userProps.isActive = !userProps.isActive" @first-name-input="userProps.firstName = $event" @last-name-input="userProps.lastName = $event"></user-form>
Answer the question
In order to leave comments, you need to log in
you can somehow, roughly speaking, send the entire mutable object upstairs
methods: {
onChange(e) {
this.userProps[e.name] = e.val;
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question