Skip to content

Commit 6210fa0

Browse files
feat(module:input-number): support standalone component (#8246)
1 parent 0a7028c commit 6210fa0

File tree

6 files changed

+98
-91
lines changed

6 files changed

+98
-91
lines changed

components/input-number/doc/index.en-US.md

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -17,49 +17,49 @@ import { NzInputNumberModule } from 'ng-zorro-antd/input-number';
1717

1818
## API
1919

20-
### nz-input-number
20+
### nz-input-number:standalone
2121

22-
| property | description | type | default |
23-
| -------- | ----------- | ---- | ------- |
24-
| `[ngModel]` | current value, double binding | `number \| string` \| `string` | - |
25-
| `[nzAutoFocus]` | get focus when component mounted | `boolean` | `false` |
26-
| `[nzDisabled]` | disable the input | `boolean` | `false` |
27-
| `[nzReadOnly]` | If readonly the input | `boolean` | `false` |
28-
| `[nzMax]` | max value | `number` | `Infinity` |
29-
| `[nzMin]` | min value | `number` | `-Infinity` |
30-
| `[nzFormatter]` | Specifies the format of the value presented | `(value: number \| string) => string \| number` | - |
31-
| `[nzParser]` | Specifies the value extracted from nzFormatter | `(value: string) => string \| number` | `(value: string) => value.trim().replace(/。/g, '.').replace(/[^\w\.-]+/g, '')` |
32-
| `[nzPrecision]` | precision of input value | `number` | - |
33-
| `[nzPrecisionMode]` | The method for calculating the precision of input value | `'cut' \| 'toFixed' \| ((value: number \| string, precision?: number) => number)` | `'toFixed'` |
34-
| `[nzSize]` | width of input box | `'large' \| 'small' \| 'default'` | `'default'` |
35-
| `[nzStatus]` | Set validation status | `'error' \| 'warning'` | - |
36-
| `[nzStep]` | The number to which the current value is increased or decreased. It can be an integer or decimal. | `number \| string` | `1` |
37-
| `[nzInputMode]` | enumerated attribute that hints at the type of data that might be entered by the user, [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inputmode) | `string` | `decimal` |
38-
| `[nzPlaceHolder]` | Placeholder of select | `string` | - |
39-
| `[nzId]` | input id attribute inside the component| `string` | - |
40-
| `(ngModelChange)` | The callback triggered when the value is changed | `EventEmitter<number>` | - |
41-
| `(nzFocus)` | focus callback | `EventEmitter<void>` | - |
42-
| `(nzBlur)` | blur callback | `EventEmitter<void>` | - |
22+
| property | description | type | default |
23+
| ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
24+
| `[ngModel]` | current value, double binding | `number \| string` \| `string` | - |
25+
| `[nzAutoFocus]` | get focus when component mounted | `boolean` | `false` |
26+
| `[nzDisabled]` | disable the input | `boolean` | `false` |
27+
| `[nzReadOnly]` | If readonly the input | `boolean` | `false` |
28+
| `[nzMax]` | max value | `number` | `Infinity` |
29+
| `[nzMin]` | min value | `number` | `-Infinity` |
30+
| `[nzFormatter]` | Specifies the format of the value presented | `(value: number \| string) => string \| number` | - |
31+
| `[nzParser]` | Specifies the value extracted from nzFormatter | `(value: string) => string \| number` | `(value: string) => value.trim().replace(/。/g, '.').replace(/[^\w\.-]+/g, '')` |
32+
| `[nzPrecision]` | precision of input value | `number` | - |
33+
| `[nzPrecisionMode]` | The method for calculating the precision of input value | `'cut' \| 'toFixed' \| ((value: number \| string, precision?: number) => number)` | `'toFixed'` |
34+
| `[nzSize]` | width of input box | `'large' \| 'small' \| 'default'` | `'default'` |
35+
| `[nzStatus]` | Set validation status | `'error' \| 'warning'` | - |
36+
| `[nzStep]` | The number to which the current value is increased or decreased. It can be an integer or decimal. | `number \| string` | `1` |
37+
| `[nzInputMode]` | enumerated attribute that hints at the type of data that might be entered by the user, [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inputmode) | `string` | `decimal` |
38+
| `[nzPlaceHolder]` | Placeholder of select | `string` | - |
39+
| `[nzId]` | input id attribute inside the component | `string` | - |
40+
| `(ngModelChange)` | The callback triggered when the value is changed | `EventEmitter<number>` | - |
41+
| `(nzFocus)` | focus callback | `EventEmitter<void>` | - |
42+
| `(nzBlur)` | blur callback | `EventEmitter<void>` | - |
4343

44-
### nz-input-number-group
44+
### nz-input-number-group:standalone
4545

46-
| Property | Description | Type | Default |
47-
| -------- | ----------- | ---- | ------- |
48-
| `[nzAddOnAfter]` | The label text displayed after (on the right side of) the input number field, can work with `nzAddOnBefore` | `string \| TemplateRef<void>` | - |
49-
| `[nzAddOnBefore]` | The label text displayed before (on the left side of) the input number field, can work with `nzAddOnAfter` | `string \| TemplateRef<void>` | - |
50-
| `[nzPrefix]` | The prefix icon for the Input Number, can work with `nzSuffix` | `string \| TemplateRef<void>` | - |
51-
| `[nzSuffix]` | The suffix icon for the Input Number, can work with `nzPrefix` | `string \| TemplateRef<void>` | - |
52-
| `[nzPrefixIcon]` | The prefix icon for the Input Number | `string` | - |
53-
| `[nzSuffixIcon]` | The suffix icon for the Input Number | `string` | - |
54-
| `[nzCompact]` | Whether use compact style | `boolean` | `false` |
55-
| `[nzSize]` | The size of `nz-input-number-group` specifies the size of the included `nz-input-number` fields | `'large' \| 'small' \| 'default'` | `'default'` |
56-
| `[nzStatus]` | Set validation status | `'error' \| 'warning'` | - |
46+
| Property | Description | Type | Default |
47+
| ----------------- | ----------------------------------------------------------------------------------------------------------- | --------------------------------- | ----------- |
48+
| `[nzAddOnAfter]` | The label text displayed after (on the right side of) the input number field, can work with `nzAddOnBefore` | `string \| TemplateRef<void>` | - |
49+
| `[nzAddOnBefore]` | The label text displayed before (on the left side of) the input number field, can work with `nzAddOnAfter` | `string \| TemplateRef<void>` | - |
50+
| `[nzPrefix]` | The prefix icon for the Input Number, can work with `nzSuffix` | `string \| TemplateRef<void>` | - |
51+
| `[nzSuffix]` | The suffix icon for the Input Number, can work with `nzPrefix` | `string \| TemplateRef<void>` | - |
52+
| `[nzPrefixIcon]` | The prefix icon for the Input Number | `string` | - |
53+
| `[nzSuffixIcon]` | The suffix icon for the Input Number | `string` | - |
54+
| `[nzCompact]` | Whether use compact style | `boolean` | `false` |
55+
| `[nzSize]` | The size of `nz-input-number-group` specifies the size of the included `nz-input-number` fields | `'large' \| 'small' \| 'default'` | `'default'` |
56+
| `[nzStatus]` | Set validation status | `'error' \| 'warning'` | - |
5757

5858
#### Methods
5959

6060
You can get instance by `ViewChild`
6161

62-
| Name | Description |
63-
| ---- | ----------- |
64-
| focus() | get focus |
65-
| blur() | remove focus |
62+
| Name | Description |
63+
| ------- | ------------ |
64+
| focus() | get focus |
65+
| blur() | remove focus |

0 commit comments

Comments
 (0)