diff --git a/src/components/common/VnInput.vue b/src/components/common/VnInput.vue index 96028862a..0d7d6edca 100644 --- a/src/components/common/VnInput.vue +++ b/src/components/common/VnInput.vue @@ -52,6 +52,12 @@ const focus = () => { defineExpose({ focus, }); + +const inputRules = (val) => { + const { min } = vnInputRef.value.$attrs; + if (min >= 0) + if (val.toString().indexOf('.') < min) return t('inputMin', { value: min }); +};