From 80b0d28872b3f8f9977b137a5918bf4088047c6d Mon Sep 17 00:00:00 2001 From: Davont Date: Tue, 2 Jul 2024 10:02:28 +0800 Subject: [PATCH] fix(chart): [chart] Fixed chart-core bug (#1708) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: chart-core添加cloneDeep引入 * fix: 修改chart组件getFormatted函数判断逻辑 * fix: 更新chart-core包版本为3.17.1 --- packages/vue/src/chart/chart-core/common/util.ts | 2 +- packages/vue/src/chart/chart-core/package.json | 2 +- packages/vue/src/chart/chart-core/src/chart-core.ts | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/vue/src/chart/chart-core/common/util.ts b/packages/vue/src/chart/chart-core/common/util.ts index 6163e7bed2..bbbc95033e 100644 --- a/packages/vue/src/chart/chart-core/common/util.ts +++ b/packages/vue/src/chart/chart-core/common/util.ts @@ -14,7 +14,7 @@ export function toUpperCase(str) { } export const getFormatted = (value, type, digit, defaultVal = '-') => { - if (typeof value === 'object') { + if (typeof value === 'object' && !isNull(value)) { value = value.value } if (isNaN(value)) { diff --git a/packages/vue/src/chart/chart-core/package.json b/packages/vue/src/chart/chart-core/package.json index fd6ec2a21c..bf0891313c 100644 --- a/packages/vue/src/chart/chart-core/package.json +++ b/packages/vue/src/chart/chart-core/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-chart-core", - "version": "3.17.0", + "version": "3.17.1", "description": "", "main": "lib/index.js", "module": "index.ts", diff --git a/packages/vue/src/chart/chart-core/src/chart-core.ts b/packages/vue/src/chart/chart-core/src/chart-core.ts index ad3a398de1..18471179c8 100644 --- a/packages/vue/src/chart/chart-core/src/chart-core.ts +++ b/packages/vue/src/chart/chart-core/src/chart-core.ts @@ -5,6 +5,7 @@ import { DEFAULT_COLORS, SAAS_DEFAULT_COLORS, SAAS_DEFAULT_SAME_COLORS, DEFAULT_ import IntegrateChart from '../base' import BaiduMapChart from '../base/components/BaiduMapChart' import AutonaviMapChart from '../base/components/AutonaviMapChart' +import cloneDeep from '../base/util/cloneDeep' import '@opentiny/vue-theme/chart-core/index.less' export default {