Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
钟摆人-Puppet゜
ant-design-pro
提交
2c0e700f
A
ant-design-pro
项目概览
钟摆人-Puppet゜
/
ant-design-pro
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
A
ant-design-pro
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
2c0e700f
编写于
5月 30, 2018
作者:
J
jim
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' into v2
上级
84315b3a
a144bbd0
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
30 addition
and
3 deletion
+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
未找到文件。
src/components/Trend/demo/basic.md
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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
浏览文件 @
2c0e700f
...
...
@@ -19,3 +19,4 @@ order: 14
|----------|------------------------------------------|-------------|-------|
| colorful | 是否彩色标记 | Boolean | true |
| flag | 上升下降标识:
`up|down`
| string | - |
| reverseColor | 颜色反转 | Boolean | true |
src/routes/Forms/BasicForm.js
浏览文件 @
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
>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录