群消息已读反馈,消息状态组件抽离

This commit is contained in:
2022-02-23 09:48:34 +08:00
parent 36f70e1b5e
commit 31c60bb319
7 changed files with 152 additions and 72 deletions

View File

@@ -77,9 +77,21 @@
if (msg.targetId == this.targetId) {
this.getNewMessage()
}
})
uni.$on('onRecallMessage', (res) => {
if (res.targetId == this.targetId) {
this.messages = this.messages.map(item => {
if (res.messageId == item.messageId) {
return res
} else {
return item
}
})
}
})
},
onUnload() {
onUnload() {
uni.$off('onRecallMessage')
uni.$off('onReadReceiptReceived')
},
methods: {