fix: 未聊天过的任务无法发送聊天表情

This commit is contained in:
kuaifan 2022-11-15 22:30:33 +08:00
parent 05b05883fd
commit 9ca6cb4fe4

View File

@ -1267,7 +1267,7 @@ export default {
//
if ($A.isSubElectron) {
this.resizeDialog().then(() => {
this.sendDialogMsg();
this.sendDialogMsg(msgText);
});
} else {
this.$nextTick(() => {
@ -1288,7 +1288,7 @@ export default {
}
this.$store.dispatch('openDialog', data.dialog_id)
} else {
this.sendDialogMsg();
this.sendDialogMsg(msgText);
}
});
}
@ -1303,7 +1303,7 @@ export default {
});
},
sendDialogMsg() {
sendDialogMsg(msgText = null) {
if (this.msgFile.length > 0) {
this.$refs.dialog.sendFileMsg(this.msgFile.map(file => Object.assign(file, {
ajaxExtraData: {
@ -1312,6 +1312,8 @@ export default {
})));
} else if (this.msgText) {
this.$refs.dialog.sendMsg(this.msgText);
} else if (typeof msgText === 'string' && msgText) {
this.$refs.dialog.sendMsg(msgText);
}
this.msgFile = [];
this.msgText = "";