fix (roundness) ranges in theme tab

This commit is contained in:
Henry Jameson 2022-03-27 13:28:59 +03:00
parent 8e711e0587
commit ccd7378347
1 changed files with 7 additions and 6 deletions

View File

@ -14,8 +14,8 @@
:id="name + '-o'" :id="name + '-o'"
class="opt" class="opt"
type="checkbox" type="checkbox"
:modelValue="present" :checked="present"
@input="$emit('update:modelValue', !present ? fallback : undefined)" @change="$emit('update:modelValue', !present ? fallback : undefined)"
> >
<label <label
v-if="typeof fallback !== 'undefined'" v-if="typeof fallback !== 'undefined'"
@ -26,7 +26,7 @@
:id="name" :id="name"
class="input-number" class="input-number"
type="range" type="range"
:value="value || fallback" :value="modelValue || fallback"
:disabled="!present || disabled" :disabled="!present || disabled"
:max="max || hardMax || 100" :max="max || hardMax || 100"
:min="min || hardMin || 0" :min="min || hardMin || 0"
@ -37,7 +37,7 @@
:id="name" :id="name"
class="input-number" class="input-number"
type="number" type="number"
:value="value || fallback" :value="modelValue || fallback"
:disabled="!present || disabled" :disabled="!present || disabled"
:max="hardMax" :max="hardMax"
:min="hardMin" :min="hardMin"
@ -50,11 +50,12 @@
<script> <script>
export default { export default {
props: [ props: [
'name', 'value', 'fallback', 'disabled', 'label', 'max', 'min', 'step', 'hardMin', 'hardMax' 'name', 'modelValue', 'fallback', 'disabled', 'label', 'max', 'min', 'step', 'hardMin', 'hardMax'
], ],
emits: ['update:modelValue'],
computed: { computed: {
present () { present () {
return typeof this.value !== 'undefined' return typeof this.modelValue !== 'undefined'
} }
} }
} }