Better inherit $attrs on extension components

This commit is contained in:
Joel Collins 2020-01-21 15:55:28 +00:00
parent dcd3fce6e1
commit 27e340413c
4 changed files with 4 additions and 0 deletions

View file

@ -10,6 +10,7 @@
type="checkbox" type="checkbox"
:value="option" :value="option"
:checked="value && value.includes(option)" :checked="value && value.includes(option)"
v-bind="$attrs"
@change="updateValue($event.target)" @change="updateValue($event.target)"
/> />
{{ option }} {{ option }}

View file

@ -8,6 +8,7 @@
:name="name" :name="name"
:value="value" :value="value"
:placeholder="placeholder" :placeholder="placeholder"
v-bind="$attrs"
@input="$emit('input', Number($event.target.value))" @input="$emit('input', Number($event.target.value))"
/> />
</div> </div>

View file

@ -5,6 +5,7 @@
<select <select
class="uk-select uk-form-small" class="uk-select uk-form-small"
:value="value" :value="value"
v-bind="$attrs"
@input="$emit('input', $event.target.value)" @input="$emit('input', $event.target.value)"
> >
<option v-for="option in options" :key="option"> <option v-for="option in options" :key="option">

View file

@ -8,6 +8,7 @@
:name="name" :name="name"
:value="value" :value="value"
:placeholder="placeholder" :placeholder="placeholder"
v-bind="$attrs"
@input="$emit('input', $event.target.value)" @input="$emit('input', $event.target.value)"
/> />
</div> </div>