diff --git a/src/components/common/VnInput.vue b/src/components/common/VnInput.vue index 3f7e46367..684770e9c 100644 --- a/src/components/common/VnInput.vue +++ b/src/components/common/VnInput.vue @@ -53,10 +53,12 @@ defineExpose({ focus, }); -const inputRules = (val) => { - const { min } = vnInputRef.value.$attrs; - if (min >= 0) if (Math.floor(val) < min) return t('inputMin', { value: min }); -}; +const inputRules = [ + (val) => { + const { min } = vnInputRef.value.$attrs; + if (min >= 0) if (Math.floor(val) < min) return t('inputMin', { value: min }); + }, +];