-
Notifications
You must be signed in to change notification settings - Fork 4k
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
feat(module:icon): switch to SVG icons #2171
Conversation
components/icon/demo/basic.ts
Outdated
@Component({ | ||
selector: 'nz-demo-icon-basic', | ||
template: ` | ||
<i icon [type]="'home'"></i> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
个人建议 icon
指令名有一定的意义,例如:
<i icon="home"></i>
我想会更好一点。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
嗯, 现在 API 的设计只考虑了和 antd 兼容 相似. 这个 API 的确更好一些.
f2b65f2
to
31bc03c
Compare
CSS update in antd 3.8.2 is also included in this pull request for previewing the result.
TODO:
|
31bc03c
to
24a9449
Compare
Released! 🎉 |
17caef5
to
c257bbe
Compare
Codecov Report
@@ Coverage Diff @@
## master #2171 +/- ##
==========================================
- Coverage 95.96% 95.92% -0.04%
==========================================
Files 482 485 +3
Lines 11956 12122 +166
Branches 1594 1621 +27
==========================================
+ Hits 11473 11628 +155
- Misses 134 139 +5
- Partials 349 355 +6
Continue to review full report at Codecov.
|
d295a7b
to
7e0a86c
Compare
d8032a6
to
ee6b83a
Compare
I solved this problem by upgrading Node.js in Netlify to 10.9.0. The reason is what I mentioned above. |
5190e96
to
145e2b3
Compare
cf3c85c
to
f4f98cb
Compare
components/icon/doc/index.zh-CN.md
Outdated
|
||
### 自定义 font 图标 | ||
|
||
在 `1.7.0` 里,我们提供了一个 `fetchFromIconfont` 方法,方便开发者调用在 iconfont.cn 上自行管理的图标。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
从 1.7.0 版本开始
components/icon/doc/index.zh-CN.md
Outdated
|
||
> `?` 为可选。 | ||
在 `1.7.0` 版本后,我们与 Ant Design `3.9.x` 同步,使用了 svg 图标替换了原先的 font 图标,从而带来了以下优势: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
从 1.7.0 版本开始
components/icon/doc/index.zh-CN.md
Outdated
|
||
- 实心和描线图标保持同名,用 `-o` 来区分,比如 `question-circle`(实心) 和 `question-circle-o`(描线); | ||
- 命名顺序:`[图标名]-[形状?]-[描线?]-[方向?]`。 | ||
### Svg 图标 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SVG
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Icons based on font files.
Issue Number: N/A
What is the new behavior?
Icons based on SVG.
Does this PR introduce a breaking change?
But we should make a break change for this in the future.
Other information