@@ -40,12 +40,12 @@ export default {
watch: {
winner(val) {
if (val) {
+ this.ws.send(JSON.stringify({ code: this.code, status: 'over' }))
if (val === 'unknow') {
alert('game over!')
} else {
alert(`${val} is winner!`)
}
- this.ws.send(JSON.stringify({ code: this.code, status: 'over' }))
},