From 3c885ddf3ce78b5be591c05bcbdac659fbe31a7a Mon Sep 17 00:00:00 2001 From: shaohuzhang1 <80892890+shaohuzhang1@users.noreply.github.com> Date: Wed, 6 Aug 2025 14:11:55 +0800 Subject: [PATCH] fix: When the slider type step size is set to 0, the verification is triggered, and when it is changed to 1, the verification disappears (#3829) --- .../constructor/items/SliderConstructor.vue | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ui/src/components/dynamics-form/constructor/items/SliderConstructor.vue b/ui/src/components/dynamics-form/constructor/items/SliderConstructor.vue index a4256c468..82c1a66c4 100644 --- a/ui/src/components/dynamics-form/constructor/items/SliderConstructor.vue +++ b/ui/src/components/dynamics-form/constructor/items/SliderConstructor.vue @@ -142,14 +142,15 @@ const step_rules = [ { required: true, validator: (rule: any, value: any, callback: any) => { - if (!value) { - callback(new Error(t('dynamicsForm.Slider.step.requiredMessage1'))) - return false - } if (value === 0) { callback(new Error(t('dynamicsForm.Slider.step.requiredMessage2'))) return false } + if (!value) { + callback(new Error(t('dynamicsForm.Slider.step.requiredMessage1'))) + return false + } + return true }, trigger: 'blur',