mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-02 15:59:38 +08:00
32 lines
730 B
Markdown
32 lines
730 B
Markdown
---
|
|
order: 3
|
|
title:
|
|
zh-CN: 使用 iconfont.cn
|
|
en-US: Use iconfont.cn
|
|
---
|
|
|
|
## zh-CN
|
|
|
|
对于使用 [iconfont.cn](http://iconfont.cn/) 的用户,通过设置 `createFromIconfontCN` 方法参数对象中的 `scriptUrl` 字段, 即可轻松地使用已有项目中的图标。
|
|
|
|
## en-US
|
|
|
|
If you are using [iconfont.cn](http://iconfont.cn/), you can use the icons in your project gracefully.
|
|
|
|
```jsx
|
|
import { Icon } from 'antd';
|
|
|
|
const IconFont = Icon.createFromIconfontCN({
|
|
scriptUrl: '//at.alicdn.com/t/font_8d5l8fzk5b87iudi.js',
|
|
});
|
|
|
|
ReactDOM.render(
|
|
<div className="icons-list">
|
|
<IconFont type="icon-tuichu" />
|
|
<IconFont type="icon-facebook" />
|
|
<IconFont type="icon-twitter" />
|
|
</div>,
|
|
mountNode,
|
|
);
|
|
```
|