0👍
If you want to use a dropdown to select it, try v-model
: https://jsfiddle.net/wostex/63t082p2/1/
If you want to change data property by some event (i.e. click a button), then use a method
. Call this method like this @click="methodName"
If you describe your task in detail, I can suggest a solution.
If you absolutely need to use a computed property for some reason, you should read this: https://v2.vuejs.org/v2/guide/computed.html#Computed-Setter
Anyway, name of your computed property should be different, than a data property.
- [Vuejs]-Accessing the others methods of my component from the swiper onSlide change
- [Vuejs]-How to check in a component which classes were applied to it?
Source:stackexchange.com