Skip to content

Commit dba9bfb

Browse files
authored
fix(chart): Hide Baidu Maps and Amap from the document and Repair the chart document (#3867)
* fix: 【Charts】update charts snapshots * fix: 修复图表height为100%时的高度问题 * fix: 优化图表extend逻辑 * fix: 修复图表extend失效问题 * fix: 删除注释 * fix: 新增图表echartOption变量,以便用户获取echart配置 * fix: 修复playground百度地图案例错误问题 * fix: 修复图表option复杂变量失效问题 * fix: 修改高德百度地图案例注释 * fix: chart-core添加cloneDeep引入 * fix: 修改chart组件getFormatted函数判断逻辑 * fix: 更新chart-core包版本为3.17.1 * fix: 修复箱型图data为空数组时的报错问题 * fix: 添加图标属性逻辑的深拷贝 * fix: 删除注释文件 * fix: 修改图表打包 * fix: 图表打包指令修改 * fix: huiCharts打包替换为Chart * fix: 新增图表解绑,解决内存泄漏问题 * fix: 添加chart实例的非空判断 * fix: 添加chart实例置空顺序 * fix: 将百度地图和高德地图从文档中隐藏,后续推荐用户使用原生地图 * fix: 修复chart图表文档api介绍未转义问题 * fix: 修改错误 * fix: async-highlight组件type属性添加默认值
1 parent e2d824a commit dba9bfb

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

examples/sites/demos/pc/menus.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,8 +347,8 @@ export const cmpMenus = [
347347
{ 'nameCn': '词云图', 'name': 'Wordcloud Chart', 'key': 'chart-wordcloud' },
348348
{ 'nameCn': '旭日图', 'name': 'Sunburst Chart', 'key': 'chart-sunburst' },
349349
{ 'nameCn': '拓扑图', 'name': 'Graph Chart', 'key': 'chart-graph' },
350-
{ 'nameCn': '百度地图', 'name': 'BaiduMap Chart', 'key': 'chart-baidu-map' },
351-
{ 'nameCn': '高德地图', 'name': 'Autonavi Chart', 'key': 'chart-autonavi-map' },
350+
// { 'nameCn': '百度地图', 'name': 'BaiduMap Chart', 'key': 'chart-baidu-map' },
351+
// { 'nameCn': '高德地图', 'name': 'Autonavi Chart', 'key': 'chart-autonavi-map' },
352352
{ 'nameCn': '箱形图', 'name': 'Boxplot Chart', 'key': 'chart-boxplot' },
353353
{ 'nameCn': '进度图', 'name': 'Process Chart', 'key': 'chart-process' }
354354
]

examples/sites/src/components/api-docs.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@
2929
<async-highlight
3030
v-if="row.code"
3131
:code="row.code.trim()"
32-
:types="props.chartCode ? 'html' : 'ts'"
32+
:type="props.chartCode ? 'chart' : ''"
3333
></async-highlight>
3434
<div v-if="row.depTypes">
3535
<async-highlight
3636
v-for="(k, i) in row.depTypes"
3737
:key="i"
3838
:code="props.currentJson.types[k]?.code"
39-
types="ts"
39+
type="ts"
4040
></async-highlight>
4141
</div>
4242
</template>

examples/sites/src/components/async-highlight.vue

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ export default defineComponent({
1919
},
2020
filename: {
2121
type: String
22+
},
23+
type: {
24+
type: String,
25+
default: ''
2226
}
2327
},
2428
setup(props) {
@@ -32,6 +36,8 @@ export default defineComponent({
3236
// highlight和其他同步任务叠加容易形成长任务,改成异步消除长任务。
3337
if (props.filename && props.filename.endsWith('.vue')) {
3438
highlightCode.value = hljs.highlight(props.code, { language: 'html' }).value
39+
} else if (props.type === 'chart') {
40+
highlightCode.value = props.code
3541
} else {
3642
highlightCode.value = hljs.highlightAuto(props.code).value
3743
}

0 commit comments

Comments
 (0)