perf: 任务聊天中发送图片时,回车可确定发送

This commit is contained in:
韦荣超 2022-02-22 17:39:22 +08:00
parent da20fafa39
commit 695fb60aa4

View File

@ -248,6 +248,9 @@ export default {
immediate: true immediate: true
} }
}, },
created() {
this.pasteEnter()
},
methods: { methods: {
sendMsg(text) { sendMsg(text) {
@ -352,7 +355,15 @@ export default {
this.dialogDrag = true; this.dialogDrag = true;
} }
}, },
pasteEnter() {
var that = this;
document.onkeydown = function (e) {
if (e.keyCode === 13 && that.pasteShow) {
that.pasteSend();
that.pasteShow = false;
}
}
},
pasteSend() { pasteSend() {
this.pasteFile.some(file => { this.pasteFile.some(file => {
this.$refs.chatUpload.upload(file) this.$refs.chatUpload.upload(file)