1200字范文,内容丰富有趣,写作的好帮手!
1200字范文 > react antd-menu中使用阿里巴巴图片矢量库iconfont

react antd-menu中使用阿里巴巴图片矢量库iconfont

时间:2018-05-21 03:23:38

相关推荐

react antd-menu中使用阿里巴巴图片矢量库iconfont

1、注册阿里巴巴登录,创建项目

2、搜索图片资源,加入购物车,点击购物车,添加图标到项目中。

3、生成symbol连接

4、antd 4.0以上使用

导入import{createFromIconfontCN}from'@ant-design/icons';

创建IconFont

exportconstIconFont=createFromIconfontCN({

scriptUrl:"///t/***********.js"

});

antd4.0一下版本

import { Icon } from 'antd';

export const IconFont = Icon.createFromIconfontCN({

scriptUrl: '///t/***********.js', // 在 上生成

});

在menu中引入,使用

在menuConfig中直接使用

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。