0👍
You could possibly use v-model. as the docs will say, it’s shorthand for the child component having a property bound from the parent and when a change event occurs you emit an update event from the child to the parent to have the parent update the property, and the child will subsequently sync to the new value.
ie:
childComponent *has value change*
onChange (value) => this.$emit("updateValue", value)
parentComponent *recieved "updateValue" event*
onUpdateValue(value) => this.parentValue = value
- [Vuejs]-Vue 3 returns an error after running my project and compiling it with npm run dev
- [Vuejs]-How can I get h2 tags with vuejs?
Source:stackexchange.com