forked from rc/aircox
update assets dependencies; still work to be done to solve it all
This commit is contained in:
@ -12,8 +12,7 @@
|
||||
|
||||
<script>
|
||||
import debounce from 'lodash/debounce'
|
||||
import {Autocomplete} from 'buefy/dist/components/autocomplete';
|
||||
import Vue from 'vue';
|
||||
import {Autocomplete} from 'buefy/dist/components/autocomplete'
|
||||
|
||||
export default {
|
||||
props: {
|
||||
@ -31,25 +30,25 @@ export default {
|
||||
data: [],
|
||||
selected: null,
|
||||
isFetching: false,
|
||||
};
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
onSelect(option) {
|
||||
console.log('selected', option)
|
||||
Vue.set(this, 'selected', option);
|
||||
this.$emit('select', option);
|
||||
this.selected = option
|
||||
this.$emit('select', option)
|
||||
},
|
||||
|
||||
fetch: debounce(function(query) {
|
||||
if(!query)
|
||||
return;
|
||||
return
|
||||
|
||||
this.isFetching = true;
|
||||
this.isFetching = true
|
||||
this.model.fetchAll(this.url.replace('${query}', query))
|
||||
.then(data => {
|
||||
this.data = data;
|
||||
this.isFetching = false;
|
||||
this.data = data
|
||||
this.isFetching = false
|
||||
}, data => { this.isFetching = false; Promise.reject(data) })
|
||||
}),
|
||||
},
|
||||
|
Reference in New Issue
Block a user