Sfoglia il codice sorgente

bugfix:补全index

XieXing 4 mesi fa
parent
commit
fc332684a9

+ 1 - 11
shudao-vue-frontend/src/components/FileReportCard.vue

@@ -153,12 +153,11 @@
 </template>
 
 <script setup>
-import { computed, ref, onMounted } from 'vue'
+import { computed, ref } from 'vue'
 import { ElMessage, ElDialog } from 'element-plus'
 import { Document, View, CopyDocument, Reading, List, Link, WarningFilled, ArrowRight } from '@element-plus/icons-vue'
 import StreamMarkdown from './StreamMarkdown.vue'
 
-
 const props = defineProps({
   report: {
     type: Object,
@@ -192,15 +191,6 @@ const getSimilarityType = (similarity) => {
   return 'danger'
 }
 
-// 组件挂载时打印调试信息
-onMounted(() => {
-  console.log('📄 [FileReportCard] 组件挂载')
-  console.log('📄 [FileReportCard] file_path:', props.report.file_path)
-  console.log('📄 [FileReportCard] source_file:', props.report.source_file)
-  console.log('📄 [FileReportCard] 完整 report:', props.report)
-})
-
-
 // 获取文件来源URL
 const sourceUrl = computed(() => {
   // 调试日志:查看report对象结构

+ 1 - 2
shudao-vue-frontend/src/views/mobile/m-Chat.vue

@@ -2107,7 +2107,7 @@ const handleFilePreview = (data) => {
 
   // 重置状态
   fileError.value = ''
-  fileLoading.value = true
+  fileLoading.value = false  // 先设为false,让组件能够渲染
 
   // 处理不同类型的输入参数
   if (typeof data === 'string') {
@@ -2121,7 +2121,6 @@ const handleFilePreview = (data) => {
     fileError.value = '文件路径为空'
     previewFilePath.value = ''
     previewFileName.value = ''
-    fileLoading.value = false
   }
 
   console.log('📄 预览文件路径:', previewFilePath.value)