From 99bb2870775c52ec8742ba0937db8f6aa4d46893 Mon Sep 17 00:00:00 2001
From: wujingjing <gersonwu@qq.com>
Date: 星期三, 17 七月 2024 16:12:03 +0800
Subject: [PATCH] 图表 height

---
 src/components/chat/chatComponents/knowledgeCom/KnowledgeCom.vue |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/components/chat/chatComponents/knowledgeCom/KnowledgeCom.vue b/src/components/chat/chatComponents/knowledgeCom/KnowledgeCom.vue
index a27b269..6bbdf98 100644
--- a/src/components/chat/chatComponents/knowledgeCom/KnowledgeCom.vue
+++ b/src/components/chat/chatComponents/knowledgeCom/KnowledgeCom.vue
@@ -1,7 +1,7 @@
 <template>
-	<div class="whitespace-pre-line space-y-7">
+	<div class="space-y-7">
 		<div v-for="(item, index) in data" :key="index">
-			<div>{{ item.answer }}</div>
+			<div v-html="md.render(item.answer)"></div>
 			<div class="space-y-1 mt-2">
 				<div v-for="(cItem, index) in item.contexts" :key="index">
 					<div class="text-blue-500 cursor-pointer inline-block" @click="pageLinkClick(cItem)">
@@ -15,13 +15,14 @@
 </template>
 
 <script setup lang="ts">
+import { md } from '../../libs/markdown';
 
 
 defineProps(['data'])
 
 const pageLinkClick = (item) => {
 	const nwin = window.open('');
-	nwin.document.write(`<p style="white-space:pre-line">${item.page_content}</p>`)
+	nwin.document.write(md.render(item.page_content))
 	nwin.focus();
 	if(item.metadata.Title){
 		nwin.document.title = item.metadata.Title

--
Gitblit v1.9.3