Skip to content
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:avatar): add avatar component #1028

Merged
merged 5 commits into from
Feb 28, 2018
Merged

feat(module:avatar): add avatar component #1028

merged 5 commits into from
Feb 28, 2018

Conversation

cipchk
Copy link
Member

@cipchk cipchk commented Feb 7, 2018

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Application (the showcase website) / infrastructure changes
[ ] Other... Please describe:

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

@coveralls
Copy link

coveralls commented Feb 7, 2018

Coverage Status

Coverage increased (+0.08%) to 98.32% when pulling 0b22177 on cipchk:avatar into a5e09fa on NG-ZORRO:0.7.0.

@@ -60,12 +62,12 @@ export class NzAvatarComponent implements OnChanges {
this._classList.forEach(_className => {
this._renderer.addClass(this._el, _className);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this.nzUpdateHostClassService.updateHostClass(this.el, classMap);

更新host class可以使用这个service,会更加方便

selector : 'nz-avatar',
selector: 'nz-avatar',
template: `
<i class="anticon anticon-{{nzIcon}}" *ngIf="nzIcon && hasIcon"></i>
Copy link
Member

@vthinkxie vthinkxie Feb 7, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<i [class]="nzIcon"></i>

nzIcon 应该直接指定 i 的className,用户可以使用自己引入的iconfont

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这会倒置无法向后兼容

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已经有无数个break changes了,不用向后兼容了

@vthinkxie vthinkxie added this to the 0.7.0 milestone Feb 22, 2018
@cipchk cipchk changed the title wip(module:avatar): add avatar component feat(module:avatar): add avatar component Feb 25, 2018
@vthinkxie vthinkxie merged commit 65535d5 into NG-ZORRO:0.7.0 Feb 28, 2018
@cipchk cipchk self-assigned this Feb 28, 2018
hsuanxyz pushed a commit to hsuanxyz/ng-zorro-antd that referenced this pull request Aug 5, 2020
* wip(module:avatar): add avatar component

* fix tslint & Use NzUpdateHostClassService Instead of class operation

* (BREAKCHANGES:nzIcon): Use ngClass Instead of string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants