diff --git a/docs/en-US/component/input-number.md b/docs/en-US/component/input-number.md index 1be199d2fe..3395f1a60b 100644 --- a/docs/en-US/component/input-number.md +++ b/docs/en-US/component/input-number.md @@ -87,6 +87,14 @@ input-number/custom ::: +## With prefix and suffix ^(2.8.4) + +:::demo Use the prefix and suffix named slots. + +input-number/with-prefix-suffix + +::: + ## API ### Attributes @@ -111,13 +119,14 @@ input-number/custom | id | same as `id` in native input | ^[string] | — | | value-on-clear ^(2.2.0) | value should be set when input box is cleared | ^[number] / ^[null] / ^[enum]`'min' \| 'max'` | — | | validate-event | whether to trigger form validation | ^[boolean] | true | - ### Slots | Name | Description | -| ---------------------- | ------------------------------------- | +|------------------------| ------------------------------------- | | decrease-icon ^(2.6.3) | custom input box button decrease icon | | increase-icon ^(2.6.3) | custom input box button increase icon | +| prefix ^(2.8.4) | content as Input prefix | +| suffix ^(2.8.4) | content as Input suffix | ### Events diff --git a/docs/examples/input-number/with-prefix-suffix.vue b/docs/examples/input-number/with-prefix-suffix.vue new file mode 100644 index 0000000000..9e6b617b08 --- /dev/null +++ b/docs/examples/input-number/with-prefix-suffix.vue @@ -0,0 +1,19 @@ + + + diff --git a/packages/components/input-number/src/input-number.vue b/packages/components/input-number/src/input-number.vue index 6c59974d34..c93145af8f 100755 --- a/packages/components/input-number/src/input-number.vue +++ b/packages/components/input-number/src/input-number.vue @@ -60,7 +60,14 @@ @focus="handleFocus" @input="handleInput" @change="handleInputChange" - /> + > + + +