diff --git a/src/components/Charts/MiniProgress/index.d.ts b/src/components/Charts/MiniProgress/index.d.ts index 0ef158e893bdbdfc16ddfb9fea3587e139d29627..6111d88d585000899875e83ec11e4fe9072fe84e 100644 --- a/src/components/Charts/MiniProgress/index.d.ts +++ b/src/components/Charts/MiniProgress/index.d.ts @@ -1,6 +1,7 @@ import React from 'react'; export interface IMiniProgressProps { target: number; + targetLabel: string; color?: string; strokeWidth?: number; percent?: number; diff --git a/src/components/Charts/MiniProgress/index.js b/src/components/Charts/MiniProgress/index.js index 795c79b15951e2bdde85c0a6fa1427ba46c8df1c..16ca2b7b8e4bf50cc1711d9effbeab333015bbba 100644 --- a/src/components/Charts/MiniProgress/index.js +++ b/src/components/Charts/MiniProgress/index.js @@ -1,11 +1,21 @@ import React from 'react'; import { Tooltip } from 'antd'; +import { formatMessage } from 'umi/locale'; import styles from './index.less'; -const MiniProgress = ({ target, color = 'rgb(19, 194, 194)', strokeWidth, percent }) => ( +const MiniProgress = ({ + targetLabel, + target, + color = 'rgb(19, 194, 194)', + strokeWidth, + percent, +}) => (
- +
diff --git a/src/locales/en-US/component.js b/src/locales/en-US/component.js index 3ba7eeda69c7cd6edc5fd8d205bd626531737a45..910f30e1115034deb50232050092a296c3263a13 100644 --- a/src/locales/en-US/component.js +++ b/src/locales/en-US/component.js @@ -2,4 +2,5 @@ export default { 'component.tagSelect.expand': 'Expand', 'component.tagSelect.collapse': 'Collapse', 'component.tagSelect.all': 'All', + 'component.miniProgress.tooltipDefault': 'Target value', }; diff --git a/src/locales/pt-BR/component.js b/src/locales/pt-BR/component.js index 7cf9999c3ab4296935f65eb6d270ec4c9126c485..d3a2c1b3137bfbd70c859c0923e12ed11f842f4b 100644 --- a/src/locales/pt-BR/component.js +++ b/src/locales/pt-BR/component.js @@ -2,4 +2,5 @@ export default { 'component.tagSelect.expand': 'Expandir', 'component.tagSelect.collapse': 'Diminuir', 'component.tagSelect.all': 'Todas', + 'component.miniProgress.tooltipDefault': 'Valor alvo', }; diff --git a/src/locales/zh-CN/component.js b/src/locales/zh-CN/component.js index 1f1feadbf6f1494e8da6a1e781a87399f1c46a8a..8d988ca0be8f0cc25b69879f90f799ec3b5774ec 100644 --- a/src/locales/zh-CN/component.js +++ b/src/locales/zh-CN/component.js @@ -2,4 +2,5 @@ export default { 'component.tagSelect.expand': '展开', 'component.tagSelect.collapse': '收起', 'component.tagSelect.all': '全部', + 'component.miniProgress.tooltipDefault': '目标值', }; diff --git a/src/locales/zh-TW/component.js b/src/locales/zh-TW/component.js index ba48e299a91a29a64e2f9834cf5b0b1d3c080fb4..dde9eb5998ca5d4bb177840d2c595f02f0fea7e3 100644 --- a/src/locales/zh-TW/component.js +++ b/src/locales/zh-TW/component.js @@ -2,4 +2,5 @@ export default { 'component.tagSelect.expand': '展開', 'component.tagSelect.collapse': '收起', 'component.tagSelect.all': '全部', + 'component.miniProgress.tooltipDefault': '目标值', };