|
@@ -7,12 +7,14 @@
|
|
|
filterable
|
|
|
remote
|
|
|
reserve-keyword
|
|
|
+ collapse-tags
|
|
|
clearable
|
|
|
:multiple="multiple"
|
|
|
:placeholder="placeholder"
|
|
|
:remote-method="remoteMethod"
|
|
|
-
|
|
|
+ ref='select'
|
|
|
:loading="loading"
|
|
|
+ @focus="onFocus"
|
|
|
@change="changeValue"
|
|
|
:style="{ width: this.selectWidt + 'px!important' }"
|
|
|
>
|
|
@@ -78,7 +80,6 @@ export default {
|
|
|
throttle(this.getOptions, 800)(query);
|
|
|
},
|
|
|
async getOptions(query) {
|
|
|
-
|
|
|
if (query&&query.length>0) {
|
|
|
let flag;
|
|
|
this.options = uniqBy(this.list.filter((item) => {
|
|
@@ -109,15 +110,18 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
changeValue(val) {
|
|
|
- console.log('调用changeValue')
|
|
|
this.isFirst = false;
|
|
|
this.$emit("input", val);
|
|
|
this.$emit("change", val);
|
|
|
+ // console.log('来了',this.$refs.select.query)
|
|
|
+ this.$nextTick(res=>{
|
|
|
+ this.getOptions(this.$refs.select.query)
|
|
|
+ })
|
|
|
+
|
|
|
|
|
|
},
|
|
|
- onFocus(val){
|
|
|
+ onFocus(){
|
|
|
|
|
|
- // getOptions
|
|
|
}
|
|
|
|
|
|
},
|