diff --git a/src/components/common/VnInput.vue b/src/components/common/VnInput.vue index 0d7d6edca..3f7e46367 100644 --- a/src/components/common/VnInput.vue +++ b/src/components/common/VnInput.vue @@ -55,8 +55,7 @@ defineExpose({ const inputRules = (val) => { const { min } = vnInputRef.value.$attrs; - if (min >= 0) - if (val.toString().indexOf('.') < min) return t('inputMin', { value: min }); + if (min >= 0) if (Math.floor(val) < min) return t('inputMin', { value: min }); };