群消息已读反馈,消息状态组件抽离
This commit is contained in:
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user