working websocket from vue to tornado

This commit is contained in:
ori agranat
2019-03-23 23:42:24 +02:00
parent ec0b07db61
commit a69bd84273
8 changed files with 47 additions and 22 deletions

View File

@@ -26,7 +26,9 @@ import chselect from './ch-select.vue'
},
methods: {
onChange(i) {
console.log(i);
// console.log(i);
this.$socket.send(JSON.stringify(i));
}
}
}

View File

@@ -14,11 +14,11 @@
<script>
export default {
name: 'ch-select',
props:{
title:"",
placeholdert:"",
list:{}
},
props:[
'title',
'placeholdert',
'list'
],
data() {
return {
content:this.value
@@ -26,7 +26,7 @@
},
methods: {
handleInput() {
this.$emit('input',this.value);
this.$emit('input',{[this.title]:this.value});
}
}
}

View File

@@ -24,7 +24,7 @@
},
methods: {
handleInput() {
this.$emit('input',this.value);
this.$emit('input',{[this.title]:this.value});
}
}
}