mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-29 02:21:41 +00:00
added contour tab and more filters to threshold
This commit is contained in:
44
chameleon-client/src/components/ch-switch.vue
Normal file
44
chameleon-client/src/components/ch-switch.vue
Normal file
@@ -0,0 +1,44 @@
|
||||
<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">
|
||||
<i-switch v-model="value" @on-change="handleInput" style="align-self: flex-start"></i-switch>
|
||||
</Col>
|
||||
</Row>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'ch-switch',
|
||||
props:{
|
||||
title: String,
|
||||
Xkey: String
|
||||
},
|
||||
methods:{
|
||||
handleInput() {
|
||||
this.$socket.sendObj({[this.Xkey]:this.value});
|
||||
}
|
||||
},
|
||||
computed:{
|
||||
value:{
|
||||
get: function(){
|
||||
return this.$store.state[this.Xkey];
|
||||
},
|
||||
set: function(value){
|
||||
this.$store.commit(this.Xkey,value);
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="" scoped>
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user