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