Преглед изворни кода

【解决todo】对话中不能清楚 chat 消息

cherishsince пре 11 месеци
родитељ
комит
b4b9015869
1 измењених фајлова са 5 додато и 1 уклоњено
  1. 5 1
      src/views/ai/chat/index/index.vue

+ 5 - 1
src/views/ai/chat/index/index.vue

@@ -198,7 +198,11 @@ const handlerConversationDelete = async (delConversation: ChatConversationVO) =>
 }
 /** 清空选中的对话 */
 const handleConversationClear = async () => {
-  // TODO @fan:需要加一个 对话进行中,不允许切换
+  // 对话进行中,不允许切换
+  if (conversationInProgress.value) {
+    message.alert('对话中,不允许切换!')
+    return false
+  }
   activeConversationId.value = null
   activeConversation.value = null
   activeMessageList.value = []