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
2c0e700f
Commit
2c0e700f
authored
May 30, 2018
by
jim
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into v2
parents
84315b3a
a144bbd0
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
30 additions
and
3 deletions
+30
-3
src/components/Trend/demo/basic.md
src/components/Trend/demo/basic.md
+1
-1
src/components/Trend/demo/reverse.md
src/components/Trend/demo/reverse.md
+17
-0
src/components/Trend/index.d.ts
src/components/Trend/index.d.ts
+1
-0
src/components/Trend/index.js
src/components/Trend/index.js
+2
-1
src/components/Trend/index.less
src/components/Trend/index.less
+7
-0
src/components/Trend/index.md
src/components/Trend/index.md
+1
-0
src/routes/Forms/BasicForm.js
src/routes/Forms/BasicForm.js
+1
-1
No files found.
src/components/Trend/demo/basic.md
View file @
2c0e700f
...
...
@@ -10,7 +10,7 @@ import Trend from 'ant-design-pro/lib/Trend';
ReactDOM
.
render
(
<
div
>
<
Trend
flag
=
"up"
>
12%
</
Trend
>
<
Trend
flag
=
"up"
>
12%
</
Trend
>
<
Trend
flag
=
"down"
style
=
{
{
marginLeft
:
8
}
}
>
11%
</
Trend
>
</
div
>
,
mountNode
);
...
...
src/components/Trend/demo/reverse.md
0 → 100644
View file @
2c0e700f
---
order
:
0
title
:
颜色反转
---
在数值背后添加一个小图标来标识涨跌情况。
````
jsx
import
Trend
from
'
ant-design-pro/lib/Trend
'
;
ReactDOM
.
render
(
<
div
>
<
Trend
flag
=
"up"
reverseColor
=
{
true
}
>
12%
</
Trend
>
<
Trend
flag
=
"down"
reverseColor
=
{
true
}
style
=
{
{
marginLeft
:
8
}
}
>
11%
</
Trend
>
</
div
>
,
mountNode
);
````
src/components/Trend/index.d.ts
View file @
2c0e700f
...
...
@@ -4,6 +4,7 @@ export interface ITrendProps {
colorful
?:
boolean
;
flag
:
'
up
'
|
'
down
'
;
style
?:
React
.
CSSProperties
;
reverseColor
?:
boolean
;
}
export
default
class
Trend
extends
React
.
Component
<
ITrendProps
,
any
>
{}
src/components/Trend/index.js
View file @
2c0e700f
...
...
@@ -3,11 +3,12 @@ import { Icon } from 'antd';
import
classNames
from
'
classnames
'
;
import
styles
from
'
./index.less
'
;
const
Trend
=
({
colorful
=
true
,
flag
,
children
,
className
,
...
rest
})
=>
{
const
Trend
=
({
colorful
=
true
,
reverseColor
=
false
,
flag
,
children
,
className
,
...
rest
})
=>
{
const
classString
=
classNames
(
styles
.
trendItem
,
{
[
styles
.
trendItemGrey
]:
!
colorful
,
[
styles
.
reverseColor
]:
reverseColor
&&
colorful
,
},
className
);
...
...
src/components/Trend/index.less
View file @
2c0e700f
...
...
@@ -27,4 +27,11 @@
&.trendItemGrey .down {
color: @text-color;
}
&.reverseColor .up {
color: @green-6;
}
&.reverseColor .down {
color: @red-6;
}
}
src/components/Trend/index.md
View file @
2c0e700f
...
...
@@ -19,3 +19,4 @@ order: 14
|----------|------------------------------------------|-------------|-------|
| colorful | 是否彩色标记 | Boolean | true |
| flag | 上升下降标识:
`up|down`
| string | - |
| reverseColor | 颜色反转 | Boolean | true |
src/routes/Forms/BasicForm.js
View file @
2c0e700f
...
...
@@ -151,7 +151,7 @@ export default class BasicForms extends PureComponent {
}
>
{
getFieldDecorator
(
'
weight
'
)(
<
InputNumber
placeholder
=
"
请输入
"
min
=
{
0
}
max
=
{
100
}
/>
)
}
<
span
>%<
/span
>
<
span
className
=
"
ant-form-text
"
>%<
/span
>
<
/FormItem
>
<
FormItem
{...
formItemLayout
}
label
=
"
目标公开
"
help
=
"
客户、邀评人默认被分享
"
>
<
div
>
...
...
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