Focus on <label> when <input> gets the focus
This commit is contained in:
parent
98252a9e15
commit
ea49834da9
1 changed files with 8 additions and 5 deletions
|
@ -14,7 +14,9 @@
|
|||
:value="label"
|
||||
v-model="model"
|
||||
:name="name"
|
||||
@change="change">
|
||||
@change="change"
|
||||
@focus="$el.focus()"
|
||||
>
|
||||
<input
|
||||
v-if="!group"
|
||||
type="checkbox"
|
||||
|
@ -23,7 +25,9 @@
|
|||
:disabled="disabled"
|
||||
:checked="currentValue"
|
||||
:name="name"
|
||||
@change="change">
|
||||
@change="change"
|
||||
@focus="$el.focus()"
|
||||
>
|
||||
</span>
|
||||
<slot><span v-if="showSlot">{{ label }}</span></slot>
|
||||
</label>
|
||||
|
@ -120,7 +124,6 @@
|
|||
},
|
||||
methods: {
|
||||
change (event) {
|
||||
console.log(event);
|
||||
if (this.disabled) {
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue