UnisKB/ui/src/components/ai-chat/component/knowledge-source-component/ParagraphDocumentContent.vue

19 lines
460 B
Vue
Raw Normal View History

2025-07-04 10:21:11 +00:00
<template>
2025-07-07 14:58:23 +00:00
<div style="width: 100%; height: 100%">
<embed v-if="is_pdf" style="width: 100%; height: 100%" :src="pdfSrc" />
2025-07-04 10:21:11 +00:00
</div>
</template>
2025-07-07 14:58:23 +00:00
<script setup lang="ts">
import { computed } from 'vue'
const props = defineProps<{
detail?: any
}>()
const is_pdf = computed(() => {
return props.detail?.meta?.source_file_id
})
const pdfSrc = computed(() => {
return `${window.MaxKB.prefix}/oss/file/${props.detail?.meta?.source_file_id}`
})
</script>