mirror of
https://github.com/kuaifan/dootask.git
synced 2026-01-24 10:58:12 +00:00
perf: 优化发消息时有时候出现空白需要滚动才出现内容的情况
This commit is contained in:
parent
26d0d07850
commit
0835e5b069
@ -62,8 +62,8 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<!--等待-->
|
<!--等待-->
|
||||||
<div v-else-if="msgData.type === 'loading'" class="content-text no-dark-content">
|
<div v-else-if="msgData.type === 'loading'" class="content-loading">
|
||||||
......
|
<Loading/>
|
||||||
</div>
|
</div>
|
||||||
<!--未知-->
|
<!--未知-->
|
||||||
<div v-else class="content-unknown">{{$L("未知的消息类型")}}</div>
|
<div v-else class="content-unknown">{{$L("未知的消息类型")}}</div>
|
||||||
|
|||||||
@ -934,26 +934,28 @@ export default {
|
|||||||
text: typeLoad ? '' : msgText,
|
text: typeLoad ? '' : msgText,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
this.tempMsgs.push(tempMsg)
|
setTimeout(_ => {
|
||||||
this.msgType = ''
|
this.tempMsgs.push(tempMsg)
|
||||||
this.replyActiveId = 0;
|
this.msgType = ''
|
||||||
this.onActive();
|
this.replyActiveId = 0;
|
||||||
this.$nextTick(this.onToBottom)
|
this.onActive();
|
||||||
//
|
this.$nextTick(this.onToBottom)
|
||||||
this.$store.dispatch("call", {
|
//
|
||||||
url: 'dialog/msg/sendtext',
|
this.$store.dispatch("call", {
|
||||||
data: {
|
url: 'dialog/msg/sendtext',
|
||||||
dialog_id: tempMsg.dialog_id,
|
data: {
|
||||||
reply_id: tempMsg.reply_id,
|
dialog_id: tempMsg.dialog_id,
|
||||||
text: msgText,
|
reply_id: tempMsg.reply_id,
|
||||||
},
|
text: msgText,
|
||||||
method: 'post',
|
},
|
||||||
complete: _ => this.tempMsgs = this.tempMsgs.filter(({id}) => id != tempId)
|
method: 'post',
|
||||||
}).then(({data}) => {
|
complete: _ => this.tempMsgs = this.tempMsgs.filter(({id}) => id != tempId)
|
||||||
this.sendSuccess(data)
|
}).then(({data}) => {
|
||||||
}).catch(({msg}) => {
|
this.sendSuccess(data)
|
||||||
$A.modalError(msg)
|
}).catch(({msg}) => {
|
||||||
});
|
$A.modalError(msg)
|
||||||
|
});
|
||||||
|
}, 10)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@ -740,6 +740,16 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.content-loading {
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
.common-loading {
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
margin: 4px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.content-unknown {
|
.content-unknown {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user