Skip to content

Commit

Permalink
perf: 知识来源使用markdown页面显示(1Panel-dev#457)
Browse files Browse the repository at this point in the history
  • Loading branch information
wangdan-fit2cloud committed May 21, 2024
1 parent 7123733 commit 81bd7e3
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion ui/src/components/ai-chat/ParagraphSourceDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@
<div class="active-button primary">{{ item.similarity?.toFixed(3) }}</div>
<template #description>
<el-scrollbar height="90">
{{ item.content }}
<MdPreview
ref="editorRef"
editorId="preview-only"
:modelValue="item.content"
/>
</el-scrollbar>
</template>
<template #footer>
Expand Down Expand Up @@ -67,6 +71,7 @@
import { ref, watch, onBeforeUnmount } from 'vue'
import { cloneDeep } from 'lodash'
import { arraySort } from '@/utils/utils'
import { MdPreview } from 'md-editor-v3'
const emit = defineEmits(['refresh'])
const ParagraphDialogRef = ref()
Expand Down Expand Up @@ -109,6 +114,12 @@ defineExpose({ open })
@media only screen and (max-width: 768px) {
.paragraph-source {
width: 90% !important;
.footer-content {
display: block;
}
.paragraph-source-card {
height: 225px;
}
}
}
</style>

0 comments on commit 81bd7e3

Please sign in to comment.