From ff761f421ae580284f1dd4254b75e8cecc8c04f7 Mon Sep 17 00:00:00 2001 From: lipenghui Date: Sun, 4 Feb 2024 09:34:19 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E6=94=B9=E5=9B=BE=E5=83=8F?= =?UTF-8?q?=E5=88=86=E6=9E=90=E5=8F=AA=E7=A9=BF=E5=9B=BE=E7=89=87=E4=B9=9F?= =?UTF-8?q?=E8=83=BD=E5=8F=91=E9=80=81=E7=9A=84bug=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/AppTextarea/index.vue | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/components/AppTextarea/index.vue b/src/components/AppTextarea/index.vue index 0bed10b..ddfde04 100644 --- a/src/components/AppTextarea/index.vue +++ b/src/components/AppTextarea/index.vue @@ -81,6 +81,11 @@ function pressEnter(event: KeyboardEvent) { return false } + emit('pressEnter', value.value, fileUrl.value) + handeleSend() +} + +function handeleSend() { if (isEmpty(trim(value.value))) { message.warning('请输入内容') setTimeout(() => { @@ -88,15 +93,7 @@ function pressEnter(event: KeyboardEvent) { }, 0) return false } - emit('pressEnter', value.value, fileUrl.value) - handeleSend() -} - -function handeleSend() { emit('send', value.value, fileUrl.value) - setTimeout(() => { - value.value = '' - }, 0) } function stopMessage() {