From 8d92933e4324a6f3f6be9c5651b9f310f6f04758 Mon Sep 17 00:00:00 2001 From: kuaifan Date: Thu, 14 Dec 2023 14:43:05 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E5=8F=91=E9=80=81=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5=E6=97=B6=E5=86=8D=E6=AC=A1=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E9=87=8D=E6=96=B0=E5=8F=91=E9=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../js/pages/manage/components/DialogWrapper.vue | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/resources/assets/js/pages/manage/components/DialogWrapper.vue b/resources/assets/js/pages/manage/components/DialogWrapper.vue index 00e714f79..0e3cc5573 100644 --- a/resources/assets/js/pages/manage/components/DialogWrapper.vue +++ b/resources/assets/js/pages/manage/components/DialogWrapper.vue @@ -1300,7 +1300,7 @@ export default { this.sendSuccess(data) }).catch(error => { this.$set(tempMsg, 'error', true) - this.$set(tempMsg, 'errorData', {type: 'text', content: error.msg, msg: textBody}) + this.$set(tempMsg, 'errorData', {type: 'text', mType: type, content: error.msg, msg: textBody}) }); } if (emptied) { @@ -1340,7 +1340,7 @@ export default { this.sendSuccess(data); }).catch(error => { this.$set(tempMsg, 'error', true) - this.$set(tempMsg, 'errorData', {type: 'record', content: error.msg, msg}) + this.$set(tempMsg, 'errorData', {type: 'record', mType: 'record', content: error.msg, msg}) }); }, @@ -2707,7 +2707,7 @@ export default { if (data.error !== true) { return } - const {type, content, msg} = data.errorData + const {type, mType, content, msg} = data.errorData const config = { icon: 'error', title: '发送失败', @@ -2718,13 +2718,10 @@ export default { } } if (type === 'text') { - config.okText = '再次编辑' + config.okText = '重新发送' config.onOk = () => { this.tempMsgs = this.tempMsgs.filter(({id}) => id != data.id) - this.$refs.input.setPasteMode(false) - this.msgText = msg - this.inputFocus() - this.$nextTick(_ => this.$refs.input.setPasteMode(true)) + this.sendMsg(msg, mType) } } else if (type === 'record') { config.okText = '重新发送'