邓洁 : socket

This commit is contained in:
邓洁
2023-12-08 22:46:41 +08:00
parent 4afc8552df
commit e7405fcf00

View File

@@ -20,7 +20,7 @@
<div>{{ item.cmd }}</div> <div>{{ item.cmd }}</div>
</div> </div>
<div v-if="item.type == 1"> <div v-if="item.type == 1">
<span style="color: red"> client send:</span> <span style="color: red">server send:</span>
<div>{{ item.cmd }}</div> <div>{{ item.cmd }}</div>
</div> </div>
</div> </div>
@@ -51,7 +51,6 @@ let dataList = ref([])
let customerSend = ref([]) let customerSend = ref([])
let token = getToken(); let token = getToken();
const child = ref(); const child = ref();
const clientSend=ref()
watch( watch(
() => dataList.value, () => dataList.value,
(newVal) => { (newVal) => {
@@ -69,6 +68,7 @@ const handleSend = () => {
type: 1, type: 1,
cmd: number.value cmd: number.value
} }
if(number.value==='')return;
socket.send(JSON.stringify(data)) socket.send(JSON.stringify(data))
dataList.value.push(data) dataList.value.push(data)
} }