npm i antd-iconfont安装后
将antd-iconfont中的html文件删除
将antd-iconfont文件夹复制到node_modules/antd中
修改antd/dist/antd.css中365-369行替换url https://at.alicdn.com/t/font_148784_v4ggb6wrjmkotj4i
为 ../antd-iconfont/iconfont 后缀名需保留
(总计需改4个)
例:
src: url('https://at.alicdn.com/t/font_148784_v4ggb6wrjmkotj4i.eot');
改为
src: url('../antd-iconfont/iconfont.eot');
重启项目ok
网友评论