AI分析内容支持Markdown渲染,标题、列表、加粗正常显示
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { nextTick, onMounted, reactive, ref, watch, computed } from 'vue'
|
||||
import { marked } from 'marked'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { listScores, listContracts, type Score } from '@/api/scores'
|
||||
import { runPipeline, type RunResponse } from '@/api/run'
|
||||
@@ -248,7 +249,7 @@ onMounted(async () => {
|
||||
<el-button v-if="aiLoading" text size="small" @click="closeAI">取消</el-button>
|
||||
</div>
|
||||
<div class="ai-body">
|
||||
<div v-if="aiContent" class="ai-text" v-html="aiContent.replace(/\n/g, '<br>')" />
|
||||
<div v-if="aiContent" class="ai-text" v-html="marked(aiContent)" />
|
||||
<div v-if="aiError" class="ai-error">{{ aiError }}</div>
|
||||
<div v-if="aiLoading && !aiContent" class="ai-loading">⏳ 正在分析...</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user