This commit is contained in:
wangdan-fit2cloud 2023-12-13 19:06:13 +08:00
parent 51bc3e8a83
commit f46f9d3282
5 changed files with 28 additions and 11 deletions

View File

@ -26,6 +26,8 @@
"markdown-it-sup": "^1.0.0",
"markdown-it-task-lists": "^2.1.1",
"markdown-it-toc-done-right": "^4.2.0",
"md-editor-v3": "^4.9.0",
"medium-zoom": "^1.1.0",
"mitt": "^3.0.0",
"npm": "^10.2.4",
"nprogress": "^0.2.0",

View File

@ -61,11 +61,9 @@
回答中 <span class="dotting"></span>
</el-card>
</div>
<el-card v-else shadow="always" class="dialog-card">
<MarkdownRenderer
:source="item.answer_text"
:inner_suffix="false"
></MarkdownRenderer>
<MdPreview ref="editorRef" editorId="preview-only" :modelValue="item.answer_text" />
</el-card>
<div class="flex-between mt-8" v-if="log">
<LogOperationButton :data="item" :applicationId="appId" />
@ -137,6 +135,8 @@ import applicationApi from '@/api/application'
import { ChatManagement, type chatType } from '@/api/type/application'
import { randomId } from '@/utils/utils'
import useStore from '@/stores'
import { MdPreview } from 'md-editor-v3'
defineOptions({ name: 'AiChat' })
const route = useRoute()
const {

View File

@ -4,3 +4,5 @@
@import './element-plus.scss';
@import 'nprogress/nprogress.css';
@import 'highlight.js/styles/default.css';
@import 'md-editor-v3/lib/preview.css';
@import './md-editor.scss';

View File

@ -0,0 +1,19 @@
.md-editor-preview {
padding: 0;
margin: 0;
font-size: inherit;
p {
padding: 0 !important;
}
.md-editor-admonition {
margin: 0;
padding: 0;
}
img {
border: 0 !important;
}
}
.md-editor-preview-wrapper {
padding: 0;
}

View File

@ -1,11 +1,5 @@
<template>
<el-drawer
v-model="visible"
size="50%"
append-to-body
@close="closeHandel"
class="chat-record-drawer"
>
<el-drawer v-model="visible" size="50%" @close="closeHandel" class="chat-record-drawer">
<template #header>
<h4>{{ application?.name }}</h4>
</template>