Update select.vue

This commit is contained in:
YikaJ 2017-02-09 20:01:50 +08:00 committed by GitHub
parent 4e85fa156c
commit 7db4e70de2

View file

@ -496,7 +496,7 @@
}
},
compiled () {
this.modelToQuery()
this.modelToQuery();
this.updateOptions(true);
document.addEventListener('keydown', this.handleKeydown);
@ -504,6 +504,7 @@
// watch slot changed
if (MutationObserver) {
this.observer = new MutationObserver(() => {
this.modelToQuery();
this.slotChange();
this.updateOptions(true, true);
});
@ -524,7 +525,7 @@
},
watch: {
model () {
this.modelToQuery()
this.modelToQuery();
if (this.multiple) {
if (this.slotChangeDuration) {
this.slotChangeDuration = false;