diff --git a/components/input-number/input-number.component.ts b/components/input-number/input-number.component.ts index fe0ea5579b1..c74d17351e7 100644 --- a/components/input-number/input-number.component.ts +++ b/components/input-number/input-number.component.ts @@ -91,9 +91,12 @@ import { NZ_SPACE_COMPACT_ITEM_TYPE, NZ_SPACE_COMPACT_SIZE, NzSpaceCompactItemDi } - @if (suffix()) { + @if (suffix() || hasFeedback()) { + @if (hasFeedback() && finalStatus().signal()) { + + } } @@ -152,9 +155,6 @@ import { NZ_SPACE_COMPACT_ITEM_TYPE, NZ_SPACE_COMPACT_SIZE, NzSpaceCompactItemDi (change)="onInputChange($event)" /> - @if (hasFeedback() && finalStatus().signal()) { - - } `, providers: [ @@ -237,7 +237,7 @@ export class NzInputNumberComponent implements OnInit, ControlValueAccessor { protected suffix = contentChild(NzInputSuffixDirective); protected addonBefore = contentChild(NzInputAddonBeforeDirective); protected addonAfter = contentChild(NzInputAddonAfterDirective); - protected hasAffix = computed(() => !!this.prefix() || !!this.suffix()); + protected hasAffix = computed(() => !!this.prefix() || !!this.suffix() || this.hasFeedback()); protected hasAddon = computed(() => !!this.addonBefore() || !!this.addonAfter()); protected class = computed(() => {