-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
关于Iconfont #270
Comments
将iconFontJS和iconFontCSS设置成本地路径后还是会去网络请求字体,因为antd中指定的icon-url还是设定的网络的,这个可以解决吗?因为项目可能只在内网用。 |
@blackboyhc 这个方案是扩展,而不是覆盖,覆盖需要在themes/default.less里设置
|
@zuiidea
|
@blackboyhc |
根本不好使啊,使用的antd@2,12,3 ,在public文件夹下放置了,和楼上一个问题 |
@superlbr 估计是我的roadhog版本太低了,0.5.4,但是升级到1.4.2,并没有什么卵用 |
since antd use svg to replace font, there's already a natural way to use iconfont. |
演示地址:http://47.92.30.98:666/UIElement/iconfont
扩展Antd的Icon,总结Iconfont在项目中的使用方法:
Symbol 前缀
和Font Family
一、 font-class引用,单色
src/utils/config.js
设置iconFontCSS
,该路径可为线上地址,或者本地路径(下载后放到public
目录中)<Iconfont type="home" />
二、 symbol引用,可彩色图标
src/utils/config.js
设置iconFontJS
,该路径可为线上地址,或者本地路径(下载后放到public
目录中)<Iconfont colorful type="boluo" />
单个SVG图标的使用方法
一、 先导入再使用
一、 require直接使用
<Iconfont colorful type={require('../../svg/emoji/vomiting.svg')} />
The text was updated successfully, but these errors were encountered: