Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
ant-design-pro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
duanledexianxianxian
ant-design-pro
Commits
76e19f15
Commit
76e19f15
authored
Mar 22, 2019
by
Vitor Gultzgoff
Committed by
陈帅
Mar 22, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Optional prop which is used as label for Tooltip #3761 (#3778)
parent
090e1840
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
17 additions
and
2 deletions
+17
-2
src/components/Charts/MiniProgress/index.d.ts
src/components/Charts/MiniProgress/index.d.ts
+1
-0
src/components/Charts/MiniProgress/index.js
src/components/Charts/MiniProgress/index.js
+12
-2
src/locales/en-US/component.js
src/locales/en-US/component.js
+1
-0
src/locales/pt-BR/component.js
src/locales/pt-BR/component.js
+1
-0
src/locales/zh-CN/component.js
src/locales/zh-CN/component.js
+1
-0
src/locales/zh-TW/component.js
src/locales/zh-TW/component.js
+1
-0
No files found.
src/components/Charts/MiniProgress/index.d.ts
View file @
76e19f15
import
React
from
'
react
'
;
import
React
from
'
react
'
;
export
interface
IMiniProgressProps
{
export
interface
IMiniProgressProps
{
target
:
number
;
target
:
number
;
targetLabel
:
string
;
color
?:
string
;
color
?:
string
;
strokeWidth
?:
number
;
strokeWidth
?:
number
;
percent
?:
number
;
percent
?:
number
;
...
...
src/components/Charts/MiniProgress/index.js
View file @
76e19f15
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
{
Tooltip
}
from
'
antd
'
;
import
{
Tooltip
}
from
'
antd
'
;
import
{
formatMessage
}
from
'
umi/locale
'
;
import
styles
from
'
./index.less
'
;
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
,
})
=>
(
<
div
className
=
{
styles
.
miniProgress
}
>
<
div
className
=
{
styles
.
miniProgress
}
>
<
Tooltip
title
=
{
`目标值:
${
target
}
%`
}
>
<
Tooltip
title
=
{
`
${
targetLabel
||
formatMessage
({
id
:
'
component.miniProgress.tooltipDefault
'
}).
concat
(
'
:
'
)}
${
target
}
%`
}
>
<
div
className
=
{
styles
.
target
}
style
=
{{
left
:
target
?
`
${
target
}
%`
:
null
}}
>
<
div
className
=
{
styles
.
target
}
style
=
{{
left
:
target
?
`
${
target
}
%`
:
null
}}
>
<
span
style
=
{{
backgroundColor
:
color
||
null
}}
/
>
<
span
style
=
{{
backgroundColor
:
color
||
null
}}
/
>
<
span
style
=
{{
backgroundColor
:
color
||
null
}}
/
>
<
span
style
=
{{
backgroundColor
:
color
||
null
}}
/
>
...
...
src/locales/en-US/component.js
View file @
76e19f15
...
@@ -2,4 +2,5 @@ export default {
...
@@ -2,4 +2,5 @@ export default {
'
component.tagSelect.expand
'
:
'
Expand
'
,
'
component.tagSelect.expand
'
:
'
Expand
'
,
'
component.tagSelect.collapse
'
:
'
Collapse
'
,
'
component.tagSelect.collapse
'
:
'
Collapse
'
,
'
component.tagSelect.all
'
:
'
All
'
,
'
component.tagSelect.all
'
:
'
All
'
,
'
component.miniProgress.tooltipDefault
'
:
'
Target value
'
,
};
};
src/locales/pt-BR/component.js
View file @
76e19f15
...
@@ -2,4 +2,5 @@ export default {
...
@@ -2,4 +2,5 @@ export default {
'
component.tagSelect.expand
'
:
'
Expandir
'
,
'
component.tagSelect.expand
'
:
'
Expandir
'
,
'
component.tagSelect.collapse
'
:
'
Diminuir
'
,
'
component.tagSelect.collapse
'
:
'
Diminuir
'
,
'
component.tagSelect.all
'
:
'
Todas
'
,
'
component.tagSelect.all
'
:
'
Todas
'
,
'
component.miniProgress.tooltipDefault
'
:
'
Valor alvo
'
,
};
};
src/locales/zh-CN/component.js
View file @
76e19f15
...
@@ -2,4 +2,5 @@ export default {
...
@@ -2,4 +2,5 @@ export default {
'
component.tagSelect.expand
'
:
'
展开
'
,
'
component.tagSelect.expand
'
:
'
展开
'
,
'
component.tagSelect.collapse
'
:
'
收起
'
,
'
component.tagSelect.collapse
'
:
'
收起
'
,
'
component.tagSelect.all
'
:
'
全部
'
,
'
component.tagSelect.all
'
:
'
全部
'
,
'
component.miniProgress.tooltipDefault
'
:
'
目标值
'
,
};
};
src/locales/zh-TW/component.js
View file @
76e19f15
...
@@ -2,4 +2,5 @@ export default {
...
@@ -2,4 +2,5 @@ export default {
'
component.tagSelect.expand
'
:
'
展開
'
,
'
component.tagSelect.expand
'
:
'
展開
'
,
'
component.tagSelect.collapse
'
:
'
收起
'
,
'
component.tagSelect.collapse
'
:
'
收起
'
,
'
component.tagSelect.all
'
:
'
全部
'
,
'
component.tagSelect.all
'
:
'
全部
'
,
'
component.miniProgress.tooltipDefault
'
:
'
目标值
'
,
};
};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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