diff --git a/breakings/2.2.1/input-number.yml b/breakings/2.2.1/input-number.yml new file mode 100644 index 0000000000..d2bc391576 --- /dev/null +++ b/breakings/2.2.1/input-number.yml @@ -0,0 +1,12 @@ +- scope: 'component' + name: 'el-input-number' + type: 'props' + version: '2.2.1' + commit_hash: '2577b06' + description: | + Add a default value setter on clear input number value. When clear event occurs, the value will be set to the + value from the new API. + props: + - api: 'value-on-clear' + before: '' + after: '"min" | "max" | null | number' diff --git a/docs/en-US/component/input-number.md b/docs/en-US/component/input-number.md index 0f5963e8a2..88cb891bea 100644 --- a/docs/en-US/component/input-number.md +++ b/docs/en-US/component/input-number.md @@ -81,22 +81,22 @@ input-number/controlled ## Attributes -| Attribute | Description | Type | Accepted Values | Default | -| --------------------- | ------------------------------------------------ | ---------------------- | --------------- | ----------- | -| model-value / v-model | binding value | number / undefined | — | — | -| min | the minimum allowed value | number | — | `-Infinity` | -| max | the maximum allowed value | number | — | `Infinity` | -| step | incremental step | number | — | 1 | -| step-strictly | whether input value can only be multiple of step | boolean | — | false | -| precision | precision of input value | number | — | — | -| size | size of the component | string | large/small | default | -| disabled | whether the component is disabled | boolean | — | false | -| controls | whether to enable the control buttons | boolean | — | true | -| controls-position | position of the control buttons | string | right | - | -| name | same as `name` in native input | string | — | — | -| label | label text | string | — | — | -| placeholder | placeholder in input | string | - | - | -| value-on-clear | value should be set when input box is cleared | string / number / null | min/max | - | +| Attribute | Description | Type | Accepted Values | Default | +| --------------------------------------------- | ------------------------------------------------ | ---------------------- | --------------- | ----------- | +| model-value / v-model | binding value | number / undefined | — | — | +| min | the minimum allowed value | number | — | `-Infinity` | +| max | the maximum allowed value | number | — | `Infinity` | +| step | incremental step | number | — | 1 | +| step-strictly | whether input value can only be multiple of step | boolean | — | false | +| precision | precision of input value | number | — | — | +| size | size of the component | string | large/small | default | +| disabled | whether the component is disabled | boolean | — | false | +| controls | whether to enable the control buttons | boolean | — | true | +| controls-position | position of the control buttons | string | right | - | +| name | same as `name` in native input | string | — | — | +| label | label text | string | — | — | +| placeholder | placeholder in input | string | - | - | +| value-on-clear | value should be set when input box is cleared | string / number / null | min/max | - | ## Events