[Vuejs]-VueJS – Computed property has no setter (but actually has)

0👍

Instead of trying to make it work like you are by using references to other things, try to refactor your logic. Maybe you don’t need a v-model in this instance (which should be used with a variable defined in data() or directly with a getter / setting computed properties) but rather want to use a method bound to @input.

For components that use custom events and values for binding to v-model:
https://v2.vuejs.org/v2/guide/components-custom-events.html#Customizing-Component-v-model

For watching data and reacting to model changes:
https://it.vuejs.org/v2/guide/computed.html#Watchers

Leave a comment