added vuex to range slider

This commit is contained in:
ori agranat
2019-03-27 23:23:01 +02:00
parent 9a2232974a
commit b86af0abea
2 changed files with 17 additions and 12 deletions

View File

@@ -1,8 +1,8 @@
<template>
<div id="Threshold">
<chrange class="spacing" title="Hue" :parentData="$store.getters.hue" @input="onChange('hue',$event)"></chrange>
<chrange class="spacing" title="Saturation" :parentData="$store.getters.saturation" @input="onChange('saturation',$event)"></chrange>
<chrange class="spacing" title="Value" :parentData="$store.getters.value" @input="onChange('value',$event)"></chrange>
<chrange class="spacing" title="Hue" Xkey="hue"></chrange>
<chrange class="spacing" title="Saturation" Xkey="saturation"></chrange>
<chrange class="spacing" title="Value" Xkey="value"></chrange>
</div>
</template>
@@ -20,9 +20,6 @@ import chselect from './ch-select.vue'
chselect
},
methods:{
onChange: function(key,event) {
this.$store.commit(key, event);
}
}
}