mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-12 07:09:55 +08:00
34 lines
571 B
Markdown
34 lines
571 B
Markdown
---
|
|
order: 1
|
|
title:
|
|
zh-CN: 单位
|
|
en-US: Unit
|
|
---
|
|
|
|
## zh-CN
|
|
|
|
通过前缀和后缀添加单位。
|
|
|
|
## en-US
|
|
|
|
Add unit through `prefix` and `suffix`.
|
|
|
|
```tsx
|
|
import { LikeOutlined } from '@ant-design/icons';
|
|
import { Col, Row, Statistic } from 'antd';
|
|
import React from 'react';
|
|
|
|
const App: React.FC = () => (
|
|
<Row gutter={16}>
|
|
<Col span={12}>
|
|
<Statistic title="Feedback" value={1128} prefix={<LikeOutlined />} />
|
|
</Col>
|
|
<Col span={12}>
|
|
<Statistic title="Unmerged" value={93} suffix="/ 100" />
|
|
</Col>
|
|
</Row>
|
|
);
|
|
|
|
export default App;
|
|
```
|