修改分段预览bug

This commit is contained in:
moon 2025-09-19 09:47:59 +08:00
parent 6f60a25b5a
commit 38023eac9a
1 changed files with 8 additions and 7 deletions

View File

@ -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'),