Explorar el Código

ai 切换结束对话

maxiaoxiao hace 11 meses
padre
commit
5c4bad35a3
Se han modificado 1 ficheros con 10 adiciones y 3 borrados
  1. 10 3
      src/views/aiModel/index.vue

+ 10 - 3
src/views/aiModel/index.vue

@@ -2,7 +2,7 @@
   <div class="counsel-container">
     <div class="counsel-header">
       <span>会话<i class="ai el-icon-chat-dot-round"></i></span>
-      <i class="el-icon-close cursor" @click="closeMsg"></i>
+      <i class="el-icon-close cursor" @click="closeModel"></i>
     </div>
     <div class="counsel-chats" ref="scrollRef">
       <div class="counsel-left flex" v-if="nowType == 'selectLand'">
@@ -70,7 +70,7 @@
         :key="i"
         class="typeitem cursor"
         :class="{ heigType: nowType == titem.value }"
-        @click="nowType = titem.value"
+        @click="typeChange(titem.value)"
       >
         <i :class="titem.icon"></i>
         {{ titem.label }}
@@ -188,6 +188,10 @@ export default {
       });
       this.spdisabled = false;
     },
+    typeChange(type) {
+      this.nowType = type;
+      this.closeMsg();
+    },
     copy(item) {
       this.sendContent = item.content;
     },
@@ -306,8 +310,11 @@ export default {
         this.$emit("close");
       }
     },
-    closeMsg() {
+    closeModel() {
       this.$emit("close");
+      this.closeMsg();
+    },
+    closeMsg() {
       closeMsg().then((ares) => {
         if (ares.status == 200) {
           this.questionList[mindex].content = ares.data.voiceMsg;