antd-mobile 自 1.0 后由之前的的 iconfont 改为 svg,Icon
组件目前只内置了部分必须的 svg icon
该仓库存放同之前 iconfont 对应的 svg 图标,方便大家直接取之使用;
- 找到你想用的 svg icon, 保存下来;
- 使用代码:
<Icon type={require('path/to/svg')} />
; - 配置 webpack 以支持自定义 svg icon,具体可参见 Icon 文档
svg icons for ant-design-mobile
antd-mobile 自 1.0 后由之前的的 iconfont 改为 svg,Icon
组件目前只内置了部分必须的 svg icon
该仓库存放同之前 iconfont 对应的 svg 图标,方便大家直接取之使用;
<Icon type={require('path/to/svg')} />
;使用<Icon type={require('path/to/svg')} />
安装"配置 webpack 以支持自定义 svg icon,具体可参见 Icon 文档",配置后无效果。
具体还有其他什么地方要改?
svg图标用样式color属性修改不了颜色,原因已找到,是因为svg里写死了颜色:
<circle fill="#4A4A4A" cx="29.767" cy="19.63" ....../>
<path fill="#4A4A4A" d="M22.102,4. ....../>
这里的fill属性要去掉,然后让用户自己用color样式去重写自己的颜色
以前用 iconfont 很容易就能找到需要的图标。现在想找个图标,太难了。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.