Преглед на файлове

fix:修改首页下载按钮展示逻辑

hanyang преди 1 година
родител
ревизия
6126fe3a9c

+ 3 - 1
src/modules/conversation-chat/DialogItem.vue

@@ -15,6 +15,7 @@
       :width="width"
       :answer_action_list="answer_action_list"
       :loading_mind_map="loading_mind_map"
+      :chat_mode="chat_mode"
       @stop="handleStopChat"
       @retry="handleRetryChat"
       @select="handleSelectChat"
@@ -42,7 +43,8 @@ const props = defineProps({
 
   answer_action_list: Array,
   agent_id: String,
-  loading_mind_map: Boolean
+  loading_mind_map: Boolean,
+  chat_mode: String
 });
 
 const emit = defineEmits(['stop', 'retry', 'select', 'edit', 'download', 'toSearchPage', 'toShowMindMap', 'send']);

+ 3 - 1
src/modules/conversation-chat/DialogList.vue

@@ -18,6 +18,7 @@
         :answer_action_list="answer_action_list"
         :agent_id="agent_id"
         :loading_mind_map="loading_mind_map"
+        :chat_mode="chat_mode"
         @select="handleSelectChat(item)"
         @edit="handleEditChat(item)"
         @download="handleDownload(item)"
@@ -74,7 +75,8 @@ const props = defineProps({
    * 控制滚动条展示
    * */
   is_show_right_page: Boolean,
-  loading_mind_map: Boolean
+  loading_mind_map: Boolean,
+  chat_mode: String
 });
 const emit = defineEmits(['edit', 'retry', 'toSearchPage', 'toShowMindMap', 'send']);
 

+ 7 - 2
src/modules/conversation-item/DialogActions.vue

@@ -18,7 +18,7 @@
         </a-tooltip>
       </div>
       <div class="action-btn-item">
-        <a-tooltip :content="$t('conversation.download')" position="top" v-if="isEnableBtn('download')">
+        <a-tooltip :content="$t('conversation.download')" position="top" v-if="show_download">
           <icon-download size="18" @click="handleDownload" />
         </a-tooltip>
       </div>
@@ -50,7 +50,8 @@ const props = defineProps({
   /**
    * 可用的操作按钮
    */
-  action_list: Array
+  action_list: Array,
+  chat_mode: String
 });
 
 const emit = defineEmits(['copy', 'retry', 'share', 'edit', 'download']);
@@ -81,6 +82,10 @@ function isEnableBtn(btn_name) {
   return false;
 }
 
+const show_download = computed(() => {
+  return props.chat_mode === 'complex-chat' || props.chat_mode === '' ? true : false;
+});
+
 /**
  * 复制内容
  */

+ 3 - 1
src/modules/conversation-item/DialogAnswer.vue

@@ -33,6 +33,7 @@
               v-if="answer_status === 2"
               class="answer-actions-btns"
               :action_list="answer_action_list"
+              :chat_mode="chat_mode"
               @copy="handleAnswerCopy"
               @share="handleAnswerShare"
               @retry="handleAnswerRetry"
@@ -108,7 +109,8 @@ const props = defineProps({
   width: Number,
 
   answer_action_list: Array,
-  loading_mind_map: Boolean
+  loading_mind_map: Boolean,
+  chat_mode: String
 });
 
 const emit = defineEmits(['stop', 'retry', 'select', 'edit', 'toSearchPage', 'download', 'toShowMindMap']);

+ 1 - 0
src/views/conversation/ConversationChatContainer.vue

@@ -37,6 +37,7 @@
               :answer_action_list="answer_action_list"
               :is_show_right_page="show_right"
               :loading_mind_map="loading_mind_map"
+              :chat_mode="chat_mode"
               @share="handleChatShare"
               @edit="handleEditChat"
               @retry="handleRetryChat"