From 38023eac9ab9b274f6ece8f3e30682eafb4873ca Mon Sep 17 00:00:00 2001 From: moon <2623532423@qq.com> Date: Fri, 19 Sep 2025 09:47:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=86=E6=AE=B5=E9=A2=84?= =?UTF-8?q?=E8=A7=88bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/datasets/components/DocumentList.vue | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/chat-client/src/views/datasets/components/DocumentList.vue b/chat-client/src/views/datasets/components/DocumentList.vue index 5ff6a8c..6f25f7c 100644 --- a/chat-client/src/views/datasets/components/DocumentList.vue +++ b/chat-client/src/views/datasets/components/DocumentList.vue @@ -899,13 +899,7 @@ const handlePreview = async (row: FileItem) => { breaks: true, gfm: true }) - const resp = await getSegmentList({ - datasetId:datasetId.value, - documentId: row.difyDocId - }) - if (resp.data?.length) { - segmentList.value = resp.data - } + previewMarkdownContent.value = marked.parse(content) as string } @@ -920,6 +914,13 @@ const handlePreview = async (row: FileItem) => { console.log("previewFileUrl (from API)", previewFileUrl.value) } } + const resp = await getSegmentList({ + datasetId:datasetId.value, + documentId: row.difyDocId + }) + if (resp.data?.length) { + segmentList.value = resp.data + } } catch (error) { ElNotification({ title: t('vabI18n.knowledge.document.errors.previewFailed'),