Fixed #1586 - InputSwitch - trueValue-falseValue features causes warning
parent
8c9c0864df
commit
6648de2769
|
@ -1,8 +1,8 @@
|
||||||
<template>
|
<template>
|
||||||
<div :class="containerClass" @click="onClick($event)" :style="style">
|
<div :class="containerClass" @click="onClick($event)" :style="style">
|
||||||
<div class="p-hidden-accessible">
|
<div class="p-hidden-accessible">
|
||||||
<input ref="input" type="checkbox" :checked="modelValue" v-bind="$attrs" @focus="onFocus($event)" @blur="onBlur($event)" @keydown.enter.prevent="onClick($event)"
|
<input ref="input" type="checkbox" :checked="checked" v-bind="$attrs" @focus="onFocus($event)" @blur="onBlur($event)" @keydown.enter.prevent="onClick($event)"
|
||||||
role="switch" :aria-checked="modelValue">
|
role="switch" :aria-checked="checked">
|
||||||
</div>
|
</div>
|
||||||
<span class="p-inputswitch-slider"></span>
|
<span class="p-inputswitch-slider"></span>
|
||||||
</div>
|
</div>
|
||||||
|
@ -14,7 +14,10 @@ export default {
|
||||||
inheritAttrs: false,
|
inheritAttrs: false,
|
||||||
emits: ['click', 'update:modelValue', 'change', 'input'],
|
emits: ['click', 'update:modelValue', 'change', 'input'],
|
||||||
props: {
|
props: {
|
||||||
modelValue: Boolean,
|
modelValue: {
|
||||||
|
type: null,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
class: null,
|
class: null,
|
||||||
style: null,
|
style: null,
|
||||||
trueValue: {
|
trueValue: {
|
||||||
|
|
Loading…
Reference in New Issue