|
|
@@ -1,131 +1,62 @@
|
|
|
<template>
|
|
|
- <el-card class="file-report-card" :class="statusClass" shadow="hover">
|
|
|
- <!-- 文件信息头部 -->
|
|
|
- <template #header>
|
|
|
- <div class="card-header">
|
|
|
- <div class="file-info">
|
|
|
- <el-icon class="file-icon"><Document /></el-icon>
|
|
|
- <div class="file-details">
|
|
|
- <div class="file-name">
|
|
|
- {{ report.report.display_name || report.source_file }}
|
|
|
- </div>
|
|
|
- <div class="file-meta">
|
|
|
- <el-tag size="small" type="info">
|
|
|
- 文件 {{ report.file_index }}/{{ report.total_files }}
|
|
|
- </el-tag>
|
|
|
- <el-tag
|
|
|
- v-if="report.metadata?.primary_category"
|
|
|
- size="small"
|
|
|
- type="success"
|
|
|
- >
|
|
|
- {{ report.metadata.primary_category }}
|
|
|
- </el-tag>
|
|
|
- <el-tag
|
|
|
- v-if="report.metadata?.secondary_category"
|
|
|
- size="small"
|
|
|
- >
|
|
|
- {{ report.metadata.secondary_category }}
|
|
|
- </el-tag>
|
|
|
- </div>
|
|
|
- <!-- 文件来源链接 -->
|
|
|
- <div v-if="sourceUrl" class="file-source-link" @click="openSourceUrl">
|
|
|
- <el-icon class="link-icon"><Link /></el-icon>
|
|
|
- <span class="link-text">{{ formatSourceUrl(sourceUrl) }}</span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="actions">
|
|
|
- <el-tooltip content="查看文件" placement="top" v-if="report.file_path">
|
|
|
- <el-button
|
|
|
- link
|
|
|
- type="primary"
|
|
|
- @click="openFile"
|
|
|
- >
|
|
|
- <el-icon><View /></el-icon>
|
|
|
- </el-button>
|
|
|
- </el-tooltip>
|
|
|
- <el-tooltip content="复制报告" placement="top">
|
|
|
- <el-button
|
|
|
- link
|
|
|
- type="primary"
|
|
|
- @click="copyReport"
|
|
|
- >
|
|
|
- <el-icon><CopyDocument /></el-icon>
|
|
|
- </el-button>
|
|
|
- </el-tooltip>
|
|
|
- </div>
|
|
|
+ <div class="file-reference-item" :class="statusClass">
|
|
|
+ <div class="file-header">
|
|
|
+ <div class="file-title-wrapper" @click="openFile" :class="{ 'clickable': report.file_path }">
|
|
|
+ <el-icon class="file-icon"><Document /></el-icon>
|
|
|
+ <span class="file-name">{{ report.report?.display_name || report.source_file }}</span>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="actions">
|
|
|
+ <el-tooltip content="复制" placement="top">
|
|
|
+ <el-button link type="primary" @click="copyReport" class="action-btn">
|
|
|
+ <el-icon><CopyDocument /></el-icon>
|
|
|
+ </el-button>
|
|
|
+ </el-tooltip>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- Metadata Row -->
|
|
|
+ <div class="file-meta" v-if="hasMetaRow">
|
|
|
+ <el-tag v-if="report.metadata?.primary_category" size="small" type="info" class="meta-tag" effect="plain">
|
|
|
+ {{ report.metadata.primary_category }}
|
|
|
+ </el-tag>
|
|
|
+ <el-tag v-if="report.metadata?.secondary_category" size="small" type="info" class="meta-tag" effect="plain">
|
|
|
+ {{ report.metadata.secondary_category }}
|
|
|
+ </el-tag>
|
|
|
+
|
|
|
+ <span class="meta-text" v-if="documentNumber !== '未提取'">{{ documentNumber }}</span>
|
|
|
+ <span class="meta-divider" v-if="documentNumber !== '未提取' && issuingUnit !== '未提取'">·</span>
|
|
|
+
|
|
|
+ <span class="meta-text" v-if="issuingUnit !== '未提取'">{{ issuingUnit }}</span>
|
|
|
+ <span class="meta-divider" v-if="issuingUnit !== '未提取' && documentDate !== '未提取'">·</span>
|
|
|
+
|
|
|
+ <span class="meta-text" v-if="documentDate !== '未提取'">{{ documentDate }}</span>
|
|
|
+
|
|
|
+ <!-- 文件来源链接 -->
|
|
|
+ <span class="meta-divider" v-if="sourceUrl && (documentNumber !== '未提取' || issuingUnit !== '未提取' || documentDate !== '未提取')">·</span>
|
|
|
+ <div v-if="sourceUrl" class="file-source-link" @click="openSourceUrl">
|
|
|
+ <el-icon class="link-icon"><Link /></el-icon>
|
|
|
+ <span class="link-text">{{ formatSourceUrl(sourceUrl) }}</span>
|
|
|
</div>
|
|
|
- </template>
|
|
|
-
|
|
|
- <!-- 报告内容 -->
|
|
|
- <div class="report-content">
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- Summary -->
|
|
|
+ <div class="file-summary" v-if="briefSummary && briefSummary !== '暂无摘要'">
|
|
|
<div v-if="report.status === 'error'" class="error-message">
|
|
|
<el-alert
|
|
|
title="生成报告时出错"
|
|
|
type="error"
|
|
|
- :description="report.report.summary"
|
|
|
+ :description="briefSummary"
|
|
|
:closable="false"
|
|
|
/>
|
|
|
</div>
|
|
|
-
|
|
|
- <div v-else>
|
|
|
- <!-- 文件分析总述 -->
|
|
|
- <div class="report-section">
|
|
|
- <h3 class="section-title collapsible" @click="isSummaryExpanded = !isSummaryExpanded">
|
|
|
- <el-icon class="collapse-icon" :class="{ collapsed: !isSummaryExpanded }">
|
|
|
- <ArrowRight />
|
|
|
- </el-icon>
|
|
|
- <span>🔹文件分析总述</span>
|
|
|
- </h3>
|
|
|
- <transition name="collapse">
|
|
|
- <div v-show="isSummaryExpanded" class="section-content">
|
|
|
- <StreamMarkdown
|
|
|
- :content="report.report?.summary || ''"
|
|
|
- :streaming="report.status === 'streaming'"
|
|
|
- />
|
|
|
- </div>
|
|
|
- </transition>
|
|
|
- </div>
|
|
|
-
|
|
|
- <!-- 文件内容解读 -->
|
|
|
- <div class="report-section">
|
|
|
- <h3 class="section-title collapsible" @click="isAnalysisExpanded = !isAnalysisExpanded">
|
|
|
- <el-icon class="collapse-icon" :class="{ collapsed: !isAnalysisExpanded }">
|
|
|
- <ArrowRight />
|
|
|
- </el-icon>
|
|
|
- <span>🔹文件内容解读</span>
|
|
|
- </h3>
|
|
|
- <transition name="collapse">
|
|
|
- <div v-show="isAnalysisExpanded" class="section-content">
|
|
|
- <StreamMarkdown
|
|
|
- :content="report.report?.analysis || ''"
|
|
|
- :streaming="report.status === 'streaming'"
|
|
|
- />
|
|
|
- </div>
|
|
|
- </transition>
|
|
|
- </div>
|
|
|
-
|
|
|
- <!-- 相关条款提取 -->
|
|
|
- <div v-if="report.report?.clauses" class="report-section">
|
|
|
- <h3 class="section-title collapsible" @click="isClausesExpanded = !isClausesExpanded">
|
|
|
- <el-icon class="collapse-icon" :class="{ collapsed: !isClausesExpanded }">
|
|
|
- <ArrowRight />
|
|
|
- </el-icon>
|
|
|
- <span>🔹相关条款提取</span>
|
|
|
- </h3>
|
|
|
- <transition name="collapse">
|
|
|
- <div v-show="isClausesExpanded" class="section-content">
|
|
|
- <StreamMarkdown
|
|
|
- :content="report.report.clauses"
|
|
|
- :streaming="report.status === 'streaming'"
|
|
|
- />
|
|
|
- </div>
|
|
|
- </transition>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ <StreamMarkdown
|
|
|
+ v-else
|
|
|
+ :content="briefSummary"
|
|
|
+ :streaming="report.status === 'streaming'"
|
|
|
+ />
|
|
|
</div>
|
|
|
-
|
|
|
+
|
|
|
<!-- iframe 预览弹窗 -->
|
|
|
<el-dialog
|
|
|
v-model="showSourcePreview"
|
|
|
@@ -149,13 +80,13 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
- </el-card>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
import { computed, ref } from 'vue'
|
|
|
import { ElMessage, ElDialog } from 'element-plus'
|
|
|
-import { Document, View, CopyDocument, Reading, List, Link, WarningFilled, ArrowRight } from '@element-plus/icons-vue'
|
|
|
+import { Document, CopyDocument, Link, WarningFilled } from '@element-plus/icons-vue'
|
|
|
import StreamMarkdown from './StreamMarkdown.vue'
|
|
|
|
|
|
const props = defineProps({
|
|
|
@@ -172,10 +103,14 @@ const showSourcePreview = ref(false)
|
|
|
const sourcePreviewUrl = ref('')
|
|
|
const sourcePreviewTitle = ref('')
|
|
|
|
|
|
-// 折叠状态控制
|
|
|
-const isSummaryExpanded = ref(true)
|
|
|
-const isAnalysisExpanded = ref(true)
|
|
|
-const isClausesExpanded = ref(true)
|
|
|
+const hasMetaRow = computed(() => {
|
|
|
+ return props.report.metadata?.primary_category ||
|
|
|
+ props.report.metadata?.secondary_category ||
|
|
|
+ documentNumber.value !== '未提取' ||
|
|
|
+ issuingUnit.value !== '未提取' ||
|
|
|
+ documentDate.value !== '未提取' ||
|
|
|
+ sourceUrl.value
|
|
|
+})
|
|
|
|
|
|
const statusClass = computed(() => {
|
|
|
return {
|
|
|
@@ -185,12 +120,61 @@ const statusClass = computed(() => {
|
|
|
}
|
|
|
})
|
|
|
|
|
|
-const getSimilarityType = (similarity) => {
|
|
|
- if (similarity >= 0.8) return 'success'
|
|
|
- if (similarity >= 0.6) return 'warning'
|
|
|
- return 'danger'
|
|
|
+const readMetadataValue = (keys, fallback = '未提取') => {
|
|
|
+ for (const key of keys) {
|
|
|
+ const value = props.report?.metadata?.[key]
|
|
|
+ if (value !== undefined && value !== null && String(value).trim()) {
|
|
|
+ return String(value).trim()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return fallback
|
|
|
}
|
|
|
|
|
|
+const formatDate = (value) => {
|
|
|
+ if (!value) {
|
|
|
+ return '未提取'
|
|
|
+ }
|
|
|
+ const date = new Date(value)
|
|
|
+ if (Number.isNaN(date.getTime())) {
|
|
|
+ return String(value)
|
|
|
+ }
|
|
|
+ return `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, '0')}-${String(date.getDate()).padStart(2, '0')}`
|
|
|
+}
|
|
|
+
|
|
|
+const documentNumber = computed(() => readMetadataValue([
|
|
|
+ 'document_number',
|
|
|
+ 'document_no',
|
|
|
+ 'doc_no',
|
|
|
+ 'issue_no',
|
|
|
+ 'serial_no',
|
|
|
+ 'file_no',
|
|
|
+ '文号',
|
|
|
+ '发文编号'
|
|
|
+]))
|
|
|
+
|
|
|
+const issuingUnit = computed(() => readMetadataValue([
|
|
|
+ 'issuing_unit',
|
|
|
+ 'issuer',
|
|
|
+ 'publish_unit',
|
|
|
+ 'source_unit',
|
|
|
+ 'department',
|
|
|
+ 'organization',
|
|
|
+ 'org_name',
|
|
|
+ '发文单位'
|
|
|
+]))
|
|
|
+
|
|
|
+const documentDate = computed(() => formatDate(
|
|
|
+ props.report?.metadata?.publish_date ||
|
|
|
+ props.report?.metadata?.issue_date ||
|
|
|
+ props.report?.metadata?.document_date ||
|
|
|
+ props.report?.metadata?.upload_date ||
|
|
|
+ props.report?.metadata?.发文日期
|
|
|
+))
|
|
|
+
|
|
|
+const briefSummary = computed(() => {
|
|
|
+ return props.report?.report?.summary || props.report?._fullContent?.summary || '暂无摘要'
|
|
|
+})
|
|
|
+
|
|
|
// 获取文件来源URL
|
|
|
const sourceUrl = computed(() => {
|
|
|
// 调试日志:查看report对象结构
|
|
|
@@ -253,18 +237,12 @@ const openFile = () => {
|
|
|
|
|
|
const copyReport = async () => {
|
|
|
const text = `
|
|
|
-文件名: ${props.report.source_file}
|
|
|
-主要分类: ${props.report.metadata?.primary_category || '未分类'}
|
|
|
-场景分类: ${props.report.metadata?.secondary_category || '未分类'}
|
|
|
-相似度: ${(props.report.similarity * 100).toFixed(1)}%
|
|
|
-
|
|
|
-🔹文件分析总述
|
|
|
-${props.report.report?.summary || ''}
|
|
|
-
|
|
|
-🔹文件内容解读
|
|
|
-${props.report.report?.analysis || ''}
|
|
|
-
|
|
|
-${props.report.report?.clauses ? '🔹相关条款提取\n' + props.report.report.clauses : ''}
|
|
|
+文件名: ${props.report.report?.display_name || props.report.source_file}
|
|
|
+发文编号: ${documentNumber.value}
|
|
|
+发文单位: ${issuingUnit.value}
|
|
|
+发文日期: ${documentDate.value}
|
|
|
+摘要:
|
|
|
+${briefSummary.value}
|
|
|
`.trim()
|
|
|
|
|
|
try {
|
|
|
@@ -284,283 +262,123 @@ const openInNewTab = () => {
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
|
-.file-report-card {
|
|
|
- margin-bottom: 12px;
|
|
|
+.file-reference-item {
|
|
|
+ margin-bottom: 16px;
|
|
|
+ padding-bottom: 16px;
|
|
|
+ border-bottom: 1px solid #ebeef5;
|
|
|
transition: all 0.3s ease;
|
|
|
- border-radius: 8px;
|
|
|
- overflow: hidden;
|
|
|
-}
|
|
|
-
|
|
|
-.file-report-card:hover {
|
|
|
- transform: translateY(-2px);
|
|
|
- box-shadow: 0 4px 16px rgba(91, 141, 239, 0.15);
|
|
|
}
|
|
|
|
|
|
-.status-processing {
|
|
|
- border-left: none;
|
|
|
-}
|
|
|
-
|
|
|
-.status-completed {
|
|
|
- border-left: none;
|
|
|
+.file-reference-item:last-child {
|
|
|
+ border-bottom: none;
|
|
|
+ margin-bottom: 8px;
|
|
|
+ padding-bottom: 8px;
|
|
|
}
|
|
|
|
|
|
.status-error {
|
|
|
- border-left: 4px solid #f56c6c;
|
|
|
+ border-left: 3px solid #f56c6c;
|
|
|
+ padding-left: 12px;
|
|
|
}
|
|
|
|
|
|
-.card-header {
|
|
|
+.file-header {
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
|
align-items: flex-start;
|
|
|
+ margin-bottom: 8px;
|
|
|
}
|
|
|
|
|
|
-.file-info {
|
|
|
+.file-title-wrapper {
|
|
|
display: flex;
|
|
|
- gap: 12px;
|
|
|
+ align-items: center;
|
|
|
+ gap: 8px;
|
|
|
flex: 1;
|
|
|
}
|
|
|
|
|
|
-.file-icon {
|
|
|
- font-size: 32px;
|
|
|
+.file-title-wrapper.clickable {
|
|
|
+ cursor: pointer;
|
|
|
+}
|
|
|
+
|
|
|
+.file-title-wrapper.clickable:hover .file-name {
|
|
|
color: #5b8def;
|
|
|
}
|
|
|
|
|
|
-.file-details {
|
|
|
- flex: 1;
|
|
|
+.file-icon {
|
|
|
+ font-size: 20px;
|
|
|
+ color: #5b8def;
|
|
|
}
|
|
|
|
|
|
.file-name {
|
|
|
- font-size: 16px;
|
|
|
+ font-size: 15px;
|
|
|
font-weight: 600;
|
|
|
color: #303133;
|
|
|
- margin-bottom: 8px;
|
|
|
- word-break: break-all;
|
|
|
+ line-height: 1.4;
|
|
|
+ word-break: break-word;
|
|
|
+ transition: color 0.2s ease;
|
|
|
}
|
|
|
|
|
|
.file-meta {
|
|
|
display: flex;
|
|
|
- gap: 8px;
|
|
|
- flex-wrap: wrap;
|
|
|
-}
|
|
|
-
|
|
|
-.file-source-link {
|
|
|
- display: inline-flex;
|
|
|
align-items: center;
|
|
|
- gap: 6px;
|
|
|
- margin-top: 8px;
|
|
|
- padding: 6px 12px;
|
|
|
- background-color: #F5F5F5;
|
|
|
- color: #666;
|
|
|
- border-radius: 6px;
|
|
|
- cursor: pointer;
|
|
|
- font-size: 13px;
|
|
|
- transition: all 0.2s ease;
|
|
|
- border: 1px solid #E8E8E8;
|
|
|
- max-width: fit-content;
|
|
|
-}
|
|
|
-
|
|
|
-.file-source-link:hover {
|
|
|
- background-color: #EAEAEA;
|
|
|
- color: #333;
|
|
|
- border-color: #D8D8D8;
|
|
|
- transform: translateY(-1px);
|
|
|
- box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
|
|
|
-}
|
|
|
-
|
|
|
-.file-source-link .link-icon {
|
|
|
- font-size: 14px;
|
|
|
- color: #999;
|
|
|
-}
|
|
|
-
|
|
|
-.file-source-link .link-text {
|
|
|
- font-weight: 500;
|
|
|
- white-space: nowrap;
|
|
|
- overflow: hidden;
|
|
|
- text-overflow: ellipsis;
|
|
|
- max-width: 200px;
|
|
|
-}
|
|
|
-
|
|
|
-.actions {
|
|
|
- display: flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
gap: 8px;
|
|
|
+ margin-bottom: 10px;
|
|
|
+ font-size: 13px;
|
|
|
+ color: #909399;
|
|
|
}
|
|
|
|
|
|
-.report-content {
|
|
|
- padding: 8px 0;
|
|
|
-}
|
|
|
-
|
|
|
-.report-section {
|
|
|
- margin-bottom: 12px;
|
|
|
+.meta-tag {
|
|
|
+ border-radius: 4px;
|
|
|
}
|
|
|
|
|
|
-.report-section:first-child {
|
|
|
- margin-top: -10px;
|
|
|
+.meta-text {
|
|
|
+ color: #606266;
|
|
|
}
|
|
|
|
|
|
-.report-section:last-child {
|
|
|
- margin-bottom: 0;
|
|
|
+.meta-divider {
|
|
|
+ color: #dcdfe6;
|
|
|
}
|
|
|
|
|
|
-.section-title {
|
|
|
- font-size: 17px;
|
|
|
- font-weight: 600;
|
|
|
- color: #303133;
|
|
|
- margin-top: 0;
|
|
|
- margin-bottom: 12px;
|
|
|
- padding-bottom: 8px;
|
|
|
- border-bottom: 2px solid #e4e7ed;
|
|
|
- display: flex;
|
|
|
+.file-source-link {
|
|
|
+ display: inline-flex;
|
|
|
align-items: center;
|
|
|
- gap: 8px;
|
|
|
-}
|
|
|
-
|
|
|
-.section-title.collapsible {
|
|
|
+ gap: 4px;
|
|
|
cursor: pointer;
|
|
|
- user-select: none;
|
|
|
- transition: all 0.3s ease;
|
|
|
-}
|
|
|
-
|
|
|
-.section-title.collapsible:hover {
|
|
|
- color: #5b8def;
|
|
|
-}
|
|
|
-
|
|
|
-.collapse-icon {
|
|
|
- font-size: 16px;
|
|
|
- color: #909399;
|
|
|
- transition: transform 0.3s ease;
|
|
|
- flex-shrink: 0;
|
|
|
-}
|
|
|
-
|
|
|
-.collapse-icon.collapsed {
|
|
|
- transform: rotate(0deg);
|
|
|
-}
|
|
|
-
|
|
|
-.section-title.collapsible:hover .collapse-icon {
|
|
|
color: #5b8def;
|
|
|
+ transition: all 0.2s ease;
|
|
|
}
|
|
|
|
|
|
-/* 默认展开状态,箭头向下旋转90度 */
|
|
|
-.collapse-icon:not(.collapsed) {
|
|
|
- transform: rotate(90deg);
|
|
|
+.file-source-link:hover {
|
|
|
+ text-decoration: underline;
|
|
|
}
|
|
|
|
|
|
-/* 折叠过渡动画 */
|
|
|
-.collapse-enter-active,
|
|
|
-.collapse-leave-active {
|
|
|
- transition: opacity 0.3s ease, max-height 0.3s ease;
|
|
|
- overflow: hidden;
|
|
|
+.file-source-link .link-icon {
|
|
|
+ font-size: 14px;
|
|
|
}
|
|
|
|
|
|
-.collapse-enter-from,
|
|
|
-.collapse-leave-to {
|
|
|
+.actions {
|
|
|
+ display: flex;
|
|
|
+ gap: 4px;
|
|
|
+ margin-left: 12px;
|
|
|
opacity: 0;
|
|
|
- max-height: 0;
|
|
|
+ transition: opacity 0.2s ease;
|
|
|
}
|
|
|
|
|
|
-.collapse-enter-to,
|
|
|
-.collapse-leave-from {
|
|
|
+.file-reference-item:hover .actions {
|
|
|
opacity: 1;
|
|
|
- max-height: 2000px;
|
|
|
}
|
|
|
|
|
|
-.section-content {
|
|
|
+.file-summary {
|
|
|
font-size: 14px;
|
|
|
- line-height: 1.8;
|
|
|
- color: #606266;
|
|
|
- word-break: break-word;
|
|
|
-}
|
|
|
-
|
|
|
-/* 移除第一个和最后一个子元素的边距,保持一致的间距 */
|
|
|
-.section-content :deep(*:first-child) {
|
|
|
- margin-top: 0 !important;
|
|
|
-}
|
|
|
-
|
|
|
-.section-content :deep(*:last-child) {
|
|
|
- margin-bottom: 0 !important;
|
|
|
-}
|
|
|
-
|
|
|
-/* Markdown 样式 */
|
|
|
-.section-content :deep(h2) {
|
|
|
- font-size: 16px;
|
|
|
- font-weight: 600;
|
|
|
- color: #303133;
|
|
|
- margin: 8px 0 4px 0;
|
|
|
- padding-bottom: 4px;
|
|
|
- border-bottom: 1px solid #dcdfe6;
|
|
|
-}
|
|
|
-
|
|
|
-.section-content :deep(h3) {
|
|
|
- font-size: 15px;
|
|
|
- font-weight: 600;
|
|
|
- color: #606266;
|
|
|
- margin: 8px 0 4px 0;
|
|
|
-}
|
|
|
-
|
|
|
-.section-content :deep(p) {
|
|
|
- margin: 8px 0;
|
|
|
-}
|
|
|
-
|
|
|
-.section-content :deep(strong) {
|
|
|
- font-weight: 600;
|
|
|
- color: #303133;
|
|
|
-}
|
|
|
-
|
|
|
-.section-content :deep(ul),
|
|
|
-.section-content :deep(ol) {
|
|
|
- margin: 8px 0;
|
|
|
- padding-left: 24px;
|
|
|
-}
|
|
|
-
|
|
|
-.section-content :deep(li) {
|
|
|
- margin: 4px 0;
|
|
|
-}
|
|
|
-
|
|
|
-.section-content :deep(blockquote) {
|
|
|
- margin: 12px 0;
|
|
|
- padding: 8px 16px;
|
|
|
- border-left: 4px solid #5b8def;
|
|
|
- background-color: #f7f9fc;
|
|
|
+ line-height: 1.6;
|
|
|
color: #606266;
|
|
|
-}
|
|
|
-
|
|
|
-.section-content :deep(code) {
|
|
|
- padding: 2px 6px;
|
|
|
- background-color: #f4f4f5;
|
|
|
- border-radius: 3px;
|
|
|
- font-family: 'Courier New', monospace;
|
|
|
- font-size: 13px;
|
|
|
-}
|
|
|
-
|
|
|
-.section-content :deep(pre) {
|
|
|
- margin: 12px 0;
|
|
|
+ background: #f8fafc;
|
|
|
padding: 12px;
|
|
|
- background-color: #f4f4f5;
|
|
|
- border-radius: 4px;
|
|
|
- overflow-x: auto;
|
|
|
-}
|
|
|
-
|
|
|
-.section-content :deep(pre code) {
|
|
|
- padding: 0;
|
|
|
- background-color: transparent;
|
|
|
-}
|
|
|
-
|
|
|
-.section-content :deep(a) {
|
|
|
- color: #5b8def;
|
|
|
- text-decoration: none;
|
|
|
-}
|
|
|
-
|
|
|
-.section-content :deep(a:hover) {
|
|
|
- text-decoration: underline;
|
|
|
-}
|
|
|
-
|
|
|
-.section-content :deep(hr) {
|
|
|
- margin: 16px 0;
|
|
|
- border: none;
|
|
|
- border-top: 1px solid #dcdfe6;
|
|
|
+ border-radius: 6px;
|
|
|
+ margin-top: 8px;
|
|
|
}
|
|
|
|
|
|
.error-message {
|
|
|
- padding: 12px 0;
|
|
|
+ padding: 8px 0;
|
|
|
}
|
|
|
|
|
|
/* iframe预览样式 */
|
|
|
@@ -596,4 +414,12 @@ const openInNewTab = () => {
|
|
|
margin-bottom: 16px;
|
|
|
font-size: 16px;
|
|
|
}
|
|
|
+
|
|
|
+/* Markdown 覆盖样式,使其在浅色背景框中更好看 */
|
|
|
+.file-summary :deep(p) {
|
|
|
+ margin: 0;
|
|
|
+}
|
|
|
+.file-summary :deep(p + p) {
|
|
|
+ margin-top: 8px;
|
|
|
+}
|
|
|
</style>
|