committed by
GitHub
10 changed files with 72 additions and 31 deletions
@ -0,0 +1,29 @@ |
|||
--- |
|||
order: 0 |
|||
title: 演示 |
|||
--- |
|||
|
|||
各种数据文案的展现方式。 |
|||
|
|||
````jsx |
|||
import NumberInfo from 'ant-design-pro/lib/NumberInfo'; |
|||
import numeral from 'numeral'; |
|||
|
|||
ReactDOM.render( |
|||
<div> |
|||
<NumberInfo |
|||
subTitle={<span>本周访问</span>} |
|||
total={numeral(12321).format('0,0')} |
|||
status="up" |
|||
subTotal={17.1} |
|||
/> |
|||
<NumberInfo |
|||
subTitle={<span>本周访问</span>} |
|||
total={numeral(12321).format('0,0')} |
|||
status="up" |
|||
subTotal={17.1} |
|||
style={{ marginTop: 16 }} |
|||
/> |
|||
</div> |
|||
, mountNode); |
|||
```` |
|||
@ -0,0 +1,19 @@ |
|||
--- |
|||
type: General |
|||
title: NumberInfo |
|||
subtitle: 数据文本 |
|||
cols: 1 |
|||
--- |
|||
|
|||
常用在数据卡片中,用于突出展示某个业务数据。 |
|||
|
|||
## API |
|||
|
|||
参数 | 说明 | 类型 | 默认值 |
|||
----|------|-----|------ |
|||
title | 标题 | ReactNode\|string | - |
|||
subTitle | 子标题 | ReactNode\|string | - |
|||
total | 总量 | ReactNode\|string | - |
|||
status | 增加状态 | 'up'\/'down' | - |
|||
theme | 状态样式 | string | 'light' |
|||
gap | 设置数字和描述直接的间距(像素) | number | 8 |
|||
Loading…
Reference in new issue