2018-07-19 19:24:19 +08:00
|
|
|
---
|
2018-08-14 17:17:51 +08:00
|
|
|
order: 3
|
2018-07-19 19:24:19 +08:00
|
|
|
title:
|
|
|
|
zh-CN: 使用 iconfont.cn
|
|
|
|
en-US: Use iconfont.cn
|
|
|
|
---
|
|
|
|
|
|
|
|
## zh-CN
|
|
|
|
|
2018-09-04 17:29:37 +08:00
|
|
|
对于使用 [iconfont.cn](http://iconfont.cn/) 的用户,通过设置 `createFromIconfontCN` 方法参数对象中的 `scriptUrl` 字段, 即可轻松地使用已有项目中的图标。
|
2018-07-19 19:24:19 +08:00
|
|
|
|
|
|
|
## en-US
|
|
|
|
|
2018-08-20 17:23:28 +08:00
|
|
|
If you are using [iconfont.cn](http://iconfont.cn/), you can use the icons in your project gracefully.
|
2018-07-19 19:24:19 +08:00
|
|
|
|
2019-05-07 14:57:32 +08:00
|
|
|
```jsx
|
2022-01-13 20:32:09 +08:00
|
|
|
import { Space } from 'antd';
|
2019-08-13 14:07:17 +08:00
|
|
|
import { createFromIconfontCN } from '@ant-design/icons';
|
2018-07-19 19:24:19 +08:00
|
|
|
|
2019-08-13 14:07:17 +08:00
|
|
|
const IconFont = createFromIconfontCN({
|
2018-08-21 17:52:41 +08:00
|
|
|
scriptUrl: '//at.alicdn.com/t/font_8d5l8fzk5b87iudi.js',
|
2018-07-19 19:24:19 +08:00
|
|
|
});
|
|
|
|
|
2022-04-03 23:27:45 +08:00
|
|
|
export default () => (
|
2022-01-13 20:32:09 +08:00
|
|
|
<Space>
|
2018-08-21 18:41:35 +08:00
|
|
|
<IconFont type="icon-tuichu" />
|
|
|
|
<IconFont type="icon-facebook" />
|
|
|
|
<IconFont type="icon-twitter" />
|
2022-04-03 23:27:45 +08:00
|
|
|
</Space>
|
2018-07-19 19:24:19 +08:00
|
|
|
);
|
2019-05-07 14:57:32 +08:00
|
|
|
```
|