This commit is contained in:
rafaeldpsilva
2025-12-19 23:54:43 +00:00
parent a94e1b06b2
commit 37ccef2f12
5 changed files with 23 additions and 23 deletions

View File

@@ -37,15 +37,15 @@
<input
v-model.number="numericValue"
type="range"
:min="action.parameters.min"
:max="action.parameters.max"
:step="action.parameters.step"
:min="action.parameters?.min"
:max="action.parameters?.max"
:step="action.parameters?.step"
class="w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer slider"
/>
<div class="flex justify-between text-sm text-gray-600">
<span>{{ action.parameters.min }}</span>
<span>{{ action.parameters?.min }}</span>
<span class="font-medium">{{ numericValue }}{{ getUnit() }}</span>
<span>{{ action.parameters.max }}</span>
<span>{{ action.parameters?.max }}</span>
</div>
</div>
</div>
@@ -157,9 +157,9 @@ watch(
(action) => {
if (action) {
if (action.parameters?.min !== undefined) {
numericValue.value = action.parameters.min
numericValue.value = action.parameters?.min ?? 0
}
if (action.parameters?.options?.length > 0) {
if (action.parameters?.options && action.parameters.options.length > 0) {
selectedOption.value = action.parameters.options[0]
}
toggleValue.value = false