Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
水玉婷
ai-wechat
Commits
82acfe7e
Commit
82acfe7e
authored
Jan 28, 2026
by
水玉婷
Browse files
feat:表格简单版总结也需要用md渲染
parent
1a6bb856
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/views/components/ChartComponent.vue
View file @
82acfe7e
<
template
>
<
div class="chart-container">
<
div class="tips" v-if="chartData?.description">
{{
chartData
?.
description
}}
<
div class="tips" v-if="chartData?.description" v-html="renderedDescription">
</div>
<!-- 图表类型选择器 -->
<
div class="chart-controls">
...
...
@@ -73,7 +72,7 @@
:value="index"
:disabled="(selectedIndexes.length >= 2 && !selectedIndexes.includes(index))"
>
{{ index }}
{{ index }}
</a-select-option>
</a-select>
</div>
...
...
@@ -143,7 +142,7 @@ import { ref, computed, watch, onMounted, defineAsyncComponent, type Ref } from
import { Select as ASelect, SelectOption as ASelectOption, Tooltip as ATooltip } from 'ant-design-vue';
import { QuestionCircleOutlined } from '@ant-design/icons-vue';
import TableComponent from './TableComponent.vue';
import {
p } from 'vue-router/dist/router-CWoNjPRp.mjs
';
import {
markdownTemplate } from './utils/markdownTemplate
';
// 类型定义
interface ChartData {
...
...
@@ -186,7 +185,12 @@ const selectedDimensions = ref<string[]>([]);
const selectedIndexes = ref<string[]>([]);
const processedChartData = ref<ChartData | null>(null);
// 计算属性
// 计算属性:渲染后的description(支持markdown)
const renderedDescription = computed(() => {
if (!props.chartData?.description) return '';
return markdownTemplate(props.chartData.description);
});
const showChartControls = computed(() => {
return selectedChartType.value === CHART_TYPES.COLUMN ||
selectedChartType.value === CHART_TYPES.LINE ||
...
...
@@ -344,7 +348,7 @@ onMounted(() => {
border: 1px solid #EBEDF0;
.tips {
margin-bottom: 8px;
font-
weight: 50
0;
font-
size:
0;
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment