fix(components): [input-number] Fix decrease and increase disabled (#10787)

This commit is contained in:
kooriookami
2022-11-27 09:01:30 +08:00
committed by GitHub
parent 135564371d
commit 3e9a2c5cd1

View File

@@ -106,13 +106,10 @@ const data = reactive<Data>({
const { formItem } = useFormItem()
const minDisabled = computed(
() =>
isNumber(props.modelValue) &&
ensurePrecision(props.modelValue, -1)! < props.min
() => isNumber(props.modelValue) && props.modelValue <= props.min
)
const maxDisabled = computed(
() =>
isNumber(props.modelValue) && ensurePrecision(props.modelValue)! > props.max
() => isNumber(props.modelValue) && props.modelValue >= props.max
)
const numPrecision = computed(() => {