mirror of
https://github.com/PhotonVision/photonvision
synced 2026-07-02 02:51:40 +00:00
to wayt bindig of parent and child
This commit is contained in:
@@ -16,16 +16,20 @@
|
||||
<script>
|
||||
export default {
|
||||
name: 'ch-slider',
|
||||
props:['title','value'],
|
||||
props:['title','parentData'],
|
||||
data() {
|
||||
return {
|
||||
content:this.value
|
||||
value:0,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleInput() {
|
||||
this.$emit('input',{[this.title]:this.value});
|
||||
this.$emit('input',this.value);
|
||||
this.$socket.sendObj({[this.title]:this.value});
|
||||
}
|
||||
},
|
||||
beforeMount () {
|
||||
this.value = this.parentData
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user