-
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
Button 组件在初始 loading 状态下,样式有误 #5392
Comments
Translation of this issue:Button assembly in the initial loading state, error patternReproduction link[Https://codesandbox.io/s/billowing-waterfall-kzh26?file=/src/app/app.component.ts](https://codesandbox.io/s/billowing-waterfall-kzh26?file=/ src / app / app.component.ts) Steps to reproduceIcon Button set of What is expected?Icon Button width normal 32px What is actually happening?Icon Button width 46px
View source found to be ng-zorro-antd/components/button/button.component.ts Lines 105 to 114 in f8cc108
When the initial
|
Reproduction link
https://codesandbox.io/s/billowing-waterfall-kzh26?file=/src/app/app.component.ts
Steps to reproduce
设置 Icon Button 的
nzLoading
属性为true
What is expected?
Icon Button 宽度为正常的 32px
What is actually happening?
Icon Button 宽度为 46px
查看源码发现是
iconCount
计算有误导致ant-btn-icon-only
的没有应用应用到元素上ng-zorro-antd/components/button/button.component.ts
Lines 105 to 114 in f8cc108
当初始
nzLoading
为true
时,assertIconOnly
方法中的iconCount
变量会包含 Loading 图标节点,导致iconCount
数量计算有误可以在
iconCount
的计算中加入nzLoading
的判断条件来修正计算结果,例如The text was updated successfully, but these errors were encountered: