增加消息类型:event

This commit is contained in:
fan
2021-01-24 15:46:15 +08:00
parent c9c76760c3
commit 0d235ac861
12 changed files with 132 additions and 31 deletions
+14 -7
View File
@@ -62,17 +62,24 @@ export default {
/>
);
}
let attrs;
if(message.type == 'event'){
attrs = {message: message};
}else{
attrs = {
timeFormat: this.timeFormat,
message: message,
reverse: this.reverseUserId == message.fromUser.id,
hideTime:this.hideTime,
hideName: this.hideName
}
}
node.push(
<tagName
ref="message"
refInFor={true}
attrs={{
timeFormat: this.timeFormat,
message: message,
reverse: this.reverseUserId == message.fromUser.id,
hideTime:this.hideTime,
hideName: this.hideName
}}
attrs={attrs}
/>
);
return node;