Commit d8bb1771d42bd63694eb5f70280c44550bc5f381

Authored by windywany
1 parent 19ae9564

let select component to emit on-query-change event so that APP can load data (op…

…tions) from server via ajax
Showing 1 changed file with 3 additions and 0 deletions   Show diff stats
src/components/select/select.vue
@@ -591,12 +591,15 @@ @@ -591,12 +591,15 @@
591 } 591 }
592 }, 592 },
593 query (val) { 593 query (val) {
  594 + this.$emit('on-query-change', val);
  595 +
594 if (findComponentDownward(this, 'OptionGroup')) { 596 if (findComponentDownward(this, 'OptionGroup')) {
595 this.broadcast('OptionGroup', 'on-query-change', val); 597 this.broadcast('OptionGroup', 'on-query-change', val);
596 this.broadcast('iOption', 'on-query-change', val); 598 this.broadcast('iOption', 'on-query-change', val);
597 } else { 599 } else {
598 this.broadcast('iOption', 'on-query-change', val); 600 this.broadcast('iOption', 'on-query-change', val);
599 } 601 }
  602 +
600 let is_hidden = true; 603 let is_hidden = true;
601 604
602 this.$nextTick(() => { 605 this.$nextTick(() => {