Explorar el Código

【缺陷修复】mall: 修复当客服消息为空时按回车键会发送空消息的 bug

puhui999 hace 6 meses
padre
commit
c50f59d181
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      src/views/mall/promotion/kefu/components/KeFuMessageList.vue

+ 2 - 1
src/views/mall/promotion/kefu/components/KeFuMessageList.vue

@@ -279,8 +279,9 @@ const handleSendMessage = async (event: any) => {
     return
   }
   // 1. 校验消息是否为空
-  if (isEmpty(unref(message.value))) {
+  if (isEmpty(unref(message.value)?.trim())) {
     messageTool.notifyWarning('请输入消息后再发送哦!')
+    message.value = ''
     return
   }
   // 2. 组织发送消息