mirror of
https://github.com/element-plus/element-plus.git
synced 2026-03-13 07:51:17 +08:00
fix(components): [input-number] Improve modelValue prop type (#16124)
* fix(components): [input-number] Improve modelValue prop type * Update packages/components/input-number/src/input-number.ts Co-authored-by: kooriookami <38392315+kooriookami@users.noreply.github.com> --------- Co-authored-by: kooriookami <38392315+kooriookami@users.noreply.github.com>
This commit is contained in:
@@ -101,7 +101,7 @@ input-number/with-prefix-suffix
|
||||
|
||||
| Name | Description | Type | Default |
|
||||
| --------------------------- | ------------------------------------------------ | --------------------------------------------- | --------- |
|
||||
| model-value / v-model | binding value | ^[number] | — |
|
||||
| model-value / v-model | binding value | ^[number] / ^[null] | — |
|
||||
| min | the minimum allowed value | ^[number] | -Infinity |
|
||||
| max | the maximum allowed value | ^[number] | Infinity |
|
||||
| step | incremental step | ^[number] | 1 |
|
||||
|
||||
@@ -45,7 +45,9 @@ export const inputNumberProps = buildProps({
|
||||
/**
|
||||
* @description binding value
|
||||
*/
|
||||
modelValue: Number,
|
||||
modelValue: {
|
||||
type: [Number, null],
|
||||
},
|
||||
/**
|
||||
* @description same as `readonly` in native input
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user