returning a value fixed

This commit is contained in:
ori agranat
2019-03-22 16:44:58 +02:00
parent 991e54a420
commit 7c017f7d3a
2 changed files with 8 additions and 8 deletions

View File

@@ -1,7 +1,7 @@
<template>
<div id="InputTab">
<chslider class="spacing" title="exposure" v-model="val" v-on:input="onChange"></chslider>
<chslider class="spacing" title="exposure" v-model="val" v-on:input="onChange(val)"></chslider>
<chslider class="spacing" title="Brightness"></chslider>
<chselect class="spacing" title="Orientation" placeholdert="" :list="['Normal','Inverted']" ></chselect>
<chselect class="spacing" title="Resolution" placeholdert="" :list="['idk']"></chselect>
@@ -15,7 +15,7 @@ import chselect from './ch-select.vue'
export default {
name: 'InputTab',
data () {
return {
return{
val
}
},
@@ -24,8 +24,8 @@ import chselect from './ch-select.vue'
chselect
},
methods: {
onChange() {
console.log(val);
onChange(i) {
console.log(i);
}
}
}

View File

@@ -5,10 +5,10 @@
<h4>{{title}}</h4>
</Col>
<col span="2">
<InputNumber v-model="val" size="small"></InputNumber>
<InputNumber v-model="value" size="small"></InputNumber>
</col>
<Col span="14">
<Slider style="margin-left:5px;" v-model="val" @on-input="handleInput"></Slider>
<Slider style="margin-left:5px;" v-model="value" @on-input="handleInput"></Slider>
</col>
</row>
</template>
@@ -19,12 +19,12 @@
props:['title','value'],
data() {
return {
val: this.value
content:this.value
}
},
methods: {
handleInput() {
this.$emit('input',this.val);
this.$emit('input',this.value);
}
}
}