Skip to content

Commit 52c6c34

Browse files
authored
fix(chart): [chart] Fixed baidu chart example and chart-core bug (#1691)
* fix: 【Charts】update charts snapshots * fix: 修复图表height为100%时的高度问题 * fix: 优化图表extend逻辑 * fix: 修复图表extend失效问题 * fix: 删除注释 * fix: 新增图表echartOption变量,以便用户获取echart配置 * fix: 修复playground百度地图案例错误问题 * fix: 修复图表option复杂变量失效问题 * fix: 修改高德百度地图案例注释
1 parent afe9682 commit 52c6c34

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

examples/sites/demos/pc/app/chart/amap/base-composition-api.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { AutonaviMap as TinyAutonaviMap } from '@opentiny/vue'
1010
1111
const options = ref({
1212
key: '4b5f2cf2cba25200cc6b68c398468899',
13-
url: 'https://webapi.amap.com/maps', // 谷歌地图接口的url地址
13+
url: 'https://webapi.amap.com/maps', // 高德地图接口的url地址
1414
v: '1.4.3',
1515
amap: {
1616
resizeEnable: true,

examples/sites/demos/pc/app/chart/amap/base.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export default {
1515
return {
1616
options: {
1717
key: '4b5f2cf2cba25200cc6b68c398468899',
18-
url: 'https://webapi.amap.com/maps', // 谷歌地图接口的url地址
18+
url: 'https://webapi.amap.com/maps', // 高德地图接口的url地址
1919
v: '1.4.3',
2020
amap: {
2121
resizeEnable: true,

examples/sites/demos/pc/app/chart/bmap/base.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ export default {
1414
data() {
1515
return {
1616
options: {
17-
key: '4b5f2cf2cba25200cc6b68c398468899',
18-
url: 'https://webapi.amap.com/maps', // 谷歌地图接口的url地址
17+
key: 'oBvDtR6nzWtVchkY4cLHtnah1VVZQKRK',
18+
url: 'https://api.map.baidu.com/api', // 百度地图接口的url地址
1919
v: '1.4.3',
2020
bmap: {
2121
resizeEnable: true,

packages/vue/src/chart/chart-core/src/chart-core.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ export default {
340340
if (Object.keys(this.options).length === 0) {
341341
this.updateChart(data)
342342
} else {
343-
this.option = JSON.parse(JSON.stringify(this.options))
343+
this.option = cloneDeep(this.options)
344344
}
345345
let { option } = this
346346
clearTimeout(this.timer)
@@ -527,7 +527,7 @@ export default {
527527
if (Object.keys(this.options).length === 0) {
528528
this.updateChart(data)
529529
} else {
530-
this.option = { ...this.options }
530+
this.option = cloneDeep(this.options)
531531
}
532532
let { option } = this
533533
option = this.afterConfigFn(option)

0 commit comments

Comments
 (0)