diff --git a/core/core-frontend/src/views/chart/components/editor/editor-senior/components/BubbleAnimateCfg.vue b/core/core-frontend/src/views/chart/components/editor/editor-senior/components/BubbleAnimateCfg.vue index 2723fef2ae..e06965c8fe 100644 --- a/core/core-frontend/src/views/chart/components/editor/editor-senior/components/BubbleAnimateCfg.vue +++ b/core/core-frontend/src/views/chart/components/editor/editor-senior/components/BubbleAnimateCfg.vue @@ -39,26 +39,18 @@ const onBubbleAnimateChange = () => { } const changeSpeedSize = v => { - const _v = parseFloat(v) - if (_v >= 0 && _v <= 5) { - state.bubbleAnimateForm.speed = _v - } else if (_v < 0) { - state.bubbleAnimateForm.speed = 0 - } else if (_v > 5) { - state.bubbleAnimateForm.speed = 5 - } + let _v = parseFloat(v) + if (isNaN(_v) || _v < 0.1) _v = 0.1 + if (_v > 5) _v = 5 + state.bubbleAnimateForm.speed = _v onBubbleAnimateChange() } const changeRingsSize = v => { - const _v = parseFloat(v) - if (_v >= 0 && _v <= 5) { - state.bubbleAnimateForm.rings = _v - } else if (_v < 0) { - state.bubbleAnimateForm.rings = 0 - } else if (_v > 5) { - state.bubbleAnimateForm.rings = 5 - } + let _v = parseFloat(v) + if (isNaN(_v) || _v < 0.1) _v = 0.1 + if (_v > 5) _v = 5 + state.bubbleAnimateForm.rings = _v onBubbleAnimateChange() } @@ -122,7 +114,7 @@ init()