合并
This commit is contained in:
parent
77fd29efb4
commit
afa9edd3ad
@ -185,9 +185,10 @@ export default class Chat {
|
|||||||
const id = window.crypto.randomUUID()
|
const id = window.crypto.randomUUID()
|
||||||
const time = new Date().toLocaleString()
|
const time = new Date().toLocaleString()
|
||||||
const type = 'text'
|
const type = 'text'
|
||||||
this.添加元素({ id, name, text, time, type })
|
const data = { id, name, text, time, type }
|
||||||
this.存储消息({ id, name, text, time, type })
|
this.添加元素(data)
|
||||||
this.send({ id, name, text, time, type })
|
this.存储消息(data)
|
||||||
|
this.send(data)
|
||||||
}
|
}
|
||||||
收到消息(data) {
|
收到消息(data) {
|
||||||
console.log('收到消息', data)
|
console.log('收到消息', data)
|
||||||
|
Loading…
Reference in New Issue
Block a user