|
@@ -612,7 +612,7 @@ export default {
|
|
|
/**
|
|
|
* @des 处理消息发送
|
|
|
*/
|
|
|
- handleSend (e) {
|
|
|
+ async handleSend (e) {
|
|
|
// 判断是否被禁言
|
|
|
if (this.blockList.some(id => id == this.userId)) {
|
|
|
Message({
|
|
@@ -637,6 +637,9 @@ export default {
|
|
|
msg: text
|
|
|
}
|
|
|
|
|
|
+ // 清空输入框
|
|
|
+ this.inputMsg = ''
|
|
|
+
|
|
|
// 用户不是第一次发言
|
|
|
if (this.group.members[this.userId]) {
|
|
|
let createTime = Date.now()
|
|
@@ -650,13 +653,15 @@ export default {
|
|
|
loading: true
|
|
|
})
|
|
|
opt.createTime = createTime
|
|
|
- }
|
|
|
|
|
|
- this.doSendMsg(opt)
|
|
|
+ this.doSendMsg(opt)
|
|
|
+ } else {
|
|
|
+ // 发言后,才滚动底部
|
|
|
+ await this.doSendMsg(opt)
|
|
|
+ }
|
|
|
|
|
|
// 滚到底部
|
|
|
this.$nextTick(function () {
|
|
|
- this.inputMsg = ''
|
|
|
this.resizeToBottom()
|
|
|
})
|
|
|
|