diff --git a/client/components/forms/ScaleInput.vue b/client/components/forms/ScaleInput.vue index ce150675..a259de16 100644 --- a/client/components/forms/ScaleInput.vue +++ b/client/components/forms/ScaleInput.vue @@ -17,7 +17,7 @@ role="button" @click="setScale(i)" > - {{ i }} + {{ parseFloat(i).toFixed(2) }} @@ -58,6 +58,10 @@ export default { computed: { scaleList() { const list = [] + if (this.stepScale == 0) { + list.push(this.minScale) + return list + } for (let i = this.minScale; i <= this.maxScale; i += this.stepScale) { list.push(i) } diff --git a/client/components/open/forms/OpenFormField.vue b/client/components/open/forms/OpenFormField.vue index 0d8bb08e..65439e03 100644 --- a/client/components/open/forms/OpenFormField.vue +++ b/client/components/open/forms/OpenFormField.vue @@ -331,7 +331,7 @@ export default { } else if (field.type === 'scale') { inputProperties.minScale = parseInt(field.scale_min_value) ?? 1 inputProperties.maxScale = parseInt(field.scale_max_value) ?? 5 - inputProperties.stepScale = parseInt(field.scale_step_value) ?? 1 + inputProperties.stepScale = parseFloat(field.scale_step_value) ?? 1 } else if (field.type === 'slider') { inputProperties.minSlider = parseInt(field.slider_min_value) ?? 0 inputProperties.maxSlider = parseInt(field.slider_max_value) ?? 50