Bunch of fixes

- Allow md-checkbox to be toggled by clicking the label
- Add capability to edit chips in md-chips
- Fix error in md-select when not used with md-multiple
This commit is contained in:
John Ryan Camatog 2017-05-25 17:06:28 +08:00
parent 9970988656
commit fcc0b120bb
4 changed files with 7 additions and 3 deletions

View file

@ -5,7 +5,7 @@
<md-ink-ripple :md-disabled="disabled" />
</div>
<label :for="id || name" class="md-checkbox-label" v-if="$slots.default">
<label :for="id || name" class="md-checkbox-label" v-if="$slots.default" @click="toggleCheck">
<slot></slot>
</label>
</div>

View file

@ -2,8 +2,10 @@
<md-input-container class="md-chips" :class="[themeClass, classes]" @click.native="applyInputFocus">
<md-chip
v-for="chip in selectedChips"
:md-editable="!mdStatic"
:md-deletable="!mdStatic"
:disabled="disabled"
@edit="editChip(chip)"
@delete="deleteChip(chip)">
<slot name="chip" :value="chip">{{ chip }}</slot>
</md-chip>

View file

@ -1,5 +1,4 @@
@import '../../core/stylesheets/variables.scss';
@import '../mdCheckbox/mdCheckbox.scss';
$radio-size: 20px;
$radio-touch-size: 48px;

View file

@ -62,7 +62,10 @@
watch: {
value(value) {
this.setTextAndValue(value);
this.selectOptions(value);
if (this.multiple) {
this.selectOptions(value);
}
},
disabled() {
this.setParentDisabled();