0👍
Waching a computed property is generally a better idea.
Vue.use(Vuetify);
var vm = new Vue({
el: "#app",
data: {
dummyData: [1, 0]
},
methods: {
doThis() {
if (this.dummy > 0) {
this.dummyData[0] = 5
}
}
},
watch: {
dummy: "doThis"
},
computed: {
dummy () {
return this.dummyData[1];
}
}
});
EDIT:
<v-slider
v-model="dummyData[index]"
:min="0" :max="5" type="numbers" single-line hide-details
:class="{'no-pointer-events': index === 0 && dummyData[index + 1] > 0}">
</v-slider>
.no-pointer-events {pointer-events: none}
- [Vuejs]-VueJs logical conditons with array elements
- [Vuejs]-JavascriptInterface cannot be called in H5
Source:stackexchange.com