mirror of
https://github.com/PhotonVision/photonvision
synced 2026-07-01 02:41:42 +00:00
47 lines
1.1 KiB
Vue
47 lines
1.1 KiB
Vue
|
|
<template>
|
|
<row type="flex" justify="start" align="middle" :gutter="1">
|
|
<Col span="4">
|
|
<h4>{{title.charAt(0).toUpperCase() + title.slice(1)}} :</h4>
|
|
</Col>
|
|
<Col span="4" style="text-align: left">
|
|
<InputNumber style="align-self: flex-start;" v-model="value" size="small"></InputNumber>
|
|
</Col>
|
|
<Col span="14">
|
|
<Slider v-model="value" @on-input="handleInput"></Slider>
|
|
</Col>
|
|
</row>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
name: 'ch-slider',
|
|
props:['title','parentData'],
|
|
data() {
|
|
return {
|
|
value:0,
|
|
}
|
|
},
|
|
methods: {
|
|
handleInput() {
|
|
this.$emit('input',this.value);
|
|
this.$socket.sendObj({[this.title]:this.value});
|
|
}
|
|
},
|
|
beforeMount () {
|
|
this.value = this.parentData
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style>
|
|
h4 {
|
|
color: #e6ebf1;
|
|
}
|
|
/* .ivu-input-number-input{
|
|
background-color: #2c3e50 !important;
|
|
color: #fff !important;
|
|
} */
|
|
</style>
|
|
|