feat(module:space): add space compact component#8755
Conversation
|
This preview will be available after the AzureCI is passed. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #8755 +/- ##
==========================================
+ Coverage 91.86% 91.91% +0.04%
==========================================
Files 541 546 +5
Lines 19142 19353 +211
Branches 2823 2858 +35
==========================================
+ Hits 17585 17788 +203
- Misses 1245 1253 +8
Partials 312 312 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
af22715 to
3c1cbd5
Compare
222eac7 to
9b8a439
Compare
2749246 to
0fa6380
Compare
f394e1f to
ac6e8c2
Compare
|
|
||
| // TODO: replace other size with this type. | ||
| export type NzSizeLDSType = 'large' | 'default' | 'small'; | ||
| export type NzSizeLMSType = 'large' | 'middle' | 'small'; |
There was a problem hiding this comment.
值得注意的是,space compact size 原本应该使用 NzSizeLMSType 类型,但是我最后选择使用 NzSizeLDSType,因为 zorro 的其他 compact 子组件均使用的是 NzSizeLDSType 类型,如果要改为 NzSizeLMSType,那会造成不小的 breaking changes。
| ) {} | ||
|
|
||
| ngOnInit(): void { | ||
| this.size.set(this.nzSize); |
There was a problem hiding this comment.
此处用于同步来自 @WithConfig 第一次设置的值
ac6e8c2 to
75936d4
Compare
f526466 to
1b7dc46
Compare
| // Special styles for Primary Button | ||
| &-compact-item.@{btn-prefix-cls}-primary { | ||
| &:not([disabled]) + &:not([disabled]) { | ||
| &:not([disabled]) + &:not([disabled]):not([ant-click-animating-without-extra-node='true']) { |
There was a problem hiding this comment.
| &-compact-vertical-item { | ||
| &.@{btn-prefix-cls}-primary { | ||
| &:not([disabled]) + &:not([disabled]) { | ||
| &:not([disabled]) + &:not([disabled]):not([ant-click-animating-without-extra-node='true']) { |
There was a problem hiding this comment.
47fb7cb to
be82f45
Compare
be82f45 to
847cebb
Compare
847cebb to
6379b43
Compare
| @Component({ | ||
| selector: 'nz-space, [nz-space]', | ||
| exportAs: 'NzSpace', | ||
| exportAs: 'nzSpace', |
There was a problem hiding this comment.
感觉算是个破坏性更新,用户需要改变使用的名称(虽然不知道有没有用户这么用)
There was a problem hiding this comment.
属于影响范围较小的破坏性更新,到时候在变更日志中说明就好了👌


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
[RFC] New component Space.Compact
What is the new behavior?
基础用法:
根据 RFC,该组件能够替代
input-group和button-group组件:button-group组件,v20 完全删除button-group组件。input-group实现还承担了 addon,affix 的功能,因此不会弃用,仅弃用 输入框组合 的用法,包括nzCompact属性。input-number组件,弃用input-number-group组件,并将它的 addon,affix 功能集成到input-number组件上Does this PR introduce a breaking change?
NzSpaceComponent 的导出名称从
NzSpace更新为规范化的nzSpace(考虑通过 schematics 帮用户自动更新)
Other information