-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Conversation
@@ -60,12 +62,12 @@ export class NzAvatarComponent implements OnChanges { | |||
this._classList.forEach(_className => { | |||
this._renderer.addClass(this._el, _className); |
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.
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> |
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.
<i [class]="nzIcon"></i> |
nzIcon 应该直接指定 i 的className,用户可以使用自己引入的iconfont
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.
这会倒置无法向后兼容
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.
已经有无数个break changes了,不用向后兼容了
* wip(module:avatar): add avatar component * fix tslint & Use NzUpdateHostClassService Instead of class operation * (BREAKCHANGES:nzIcon): Use ngClass Instead of string
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?
Issue Number: N/A
What is the new behavior?
Does this PR introduce a breaking change?
Other information