fix: unable to set target values (#873)
This commit is contained in:
1 parent
ceb03862a5
commit
5c536b18ec
2 files changed
+36
-34
No files matched your search
@@ -74,21 +74,22 @@
|
||||
<v-icon v-if="controllable && !pwm" @click="switchOutputPin">
|
||||
{{ value ? mdiToggleSwitch : mdiToggleSwitchOffOutline }}
|
||||
</v-icon>
|
||||
<v-text-field
|
||||
v-if="controllable && pwm"
|
||||
v-model="inputValue"
|
||||
:error="errors().length > 0"
|
||||
suffix="%"
|
||||
type="number"
|
||||
hide-spin-buttons
|
||||
hide-details
|
||||
outlined
|
||||
dense
|
||||
class="_slider-input pt-1"
|
||||
@blur="inputValue = Math.round(parseFloat(sliderValue) * 100)"
|
||||
@focus="$event.target.select()"
|
||||
@keydown="checkInvalidChars"
|
||||
@keyup.enter="submitInput"></v-text-field>
|
||||
<form @submit.prevent="submitInput">
|
||||
<v-text-field
|
||||
v-if="controllable && pwm"
|
||||
v-model="inputValue"
|
||||
:error="errors().length > 0"
|
||||
suffix="%"
|
||||
type="number"
|
||||
hide-spin-buttons
|
||||
hide-details
|
||||
outlined
|
||||
dense
|
||||
class="_slider-input pt-1"
|
||||
@blur="inputValue = Math.round(parseFloat(sliderValue) * 100)"
|
||||
@focus="$event.target.select()"
|
||||
@keydown="checkInvalidChars"></v-text-field>
|
||||
</form>
|
||||
</v-subheader>
|
||||
<transition name="fade">
|
||||
<!-- display errors -->
|
||||
|
||||
@@ -67,25 +67,26 @@
|
||||
</v-btn>
|
||||
<v-spacer></v-spacer>
|
||||
<span v-if="!hasInputField" class="font-weight-bold">{{ value }} {{ unit }}</span>
|
||||
<v-text-field
|
||||
v-if="hasInputField"
|
||||
v-model="numInput"
|
||||
:error="errors().length > 0"
|
||||
:suffix="unit"
|
||||
type="number"
|
||||
hide-spin-buttons
|
||||
hide-details
|
||||
outlined
|
||||
dense
|
||||
class="_slider-input d-flex align-center pt-1"
|
||||
@blur="numInput = value"
|
||||
@focus="$event.target.select()"
|
||||
@keydown="checkInvalidChars"
|
||||
@keyup.enter="submitInput">
|
||||
<template v-if="value !== defaultValue || value !== numInput" #append>
|
||||
<v-icon small @click="resetSlider">{{ mdiRestart }}</v-icon>
|
||||
</template>
|
||||
</v-text-field>
|
||||
<form @submit.prevent="submitInput">
|
||||
<v-text-field
|
||||
v-if="hasInputField"
|
||||
v-model="numInput"
|
||||
:error="errors().length > 0"
|
||||
:suffix="unit"
|
||||
type="number"
|
||||
hide-spin-buttons
|
||||
hide-details
|
||||
outlined
|
||||
dense
|
||||
class="_slider-input d-flex align-center pt-1"
|
||||
@blur="numInput = value"
|
||||
@focus="$event.target.select()"
|
||||
@keydown="checkInvalidChars">
|
||||
<template v-if="value !== defaultValue || value !== numInput" #append>
|
||||
<v-icon small @click="resetSlider">{{ mdiRestart }}</v-icon>
|
||||
</template>
|
||||
</v-text-field>
|
||||
</form>
|
||||
</v-subheader>
|
||||
<transition name="fade">
|
||||
<!-- display errors-->
|
||||
|
||||
Reference in new issue
Block a user