update Select
This commit is contained in:
parent
393d85515e
commit
f10b27f99d
2 changed files with 8 additions and 3 deletions
|
@ -82,7 +82,7 @@
|
||||||
return item.label.toLowerCase()
|
return item.label.toLowerCase()
|
||||||
.indexOf(query.toLowerCase()) > -1;
|
.indexOf(query.toLowerCase()) > -1;
|
||||||
});
|
});
|
||||||
}, 500);
|
}, 200);
|
||||||
} else {
|
} else {
|
||||||
this.options = [];
|
this.options = [];
|
||||||
}
|
}
|
||||||
|
|
|
@ -630,7 +630,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.filterable) {
|
if (this.filterable) {
|
||||||
this.selectToChangeQuery = true;
|
// remote&filterable&multiple时,一次点多项,不应该设置true,因为无法置为false,下次的搜索会失效
|
||||||
|
if (this.query !== '') this.selectToChangeQuery = true;
|
||||||
this.query = '';
|
this.query = '';
|
||||||
this.$refs.input.focus();
|
this.$refs.input.focus();
|
||||||
}
|
}
|
||||||
|
@ -640,7 +641,7 @@
|
||||||
if (this.filterable) {
|
if (this.filterable) {
|
||||||
this.findChild((child) => {
|
this.findChild((child) => {
|
||||||
if (child.value === value) {
|
if (child.value === value) {
|
||||||
this.selectToChangeQuery = true;
|
if (this.query !== '') this.selectToChangeQuery = true;
|
||||||
this.query = child.label === undefined ? child.searchLabel : child.label;
|
this.query = child.label === undefined ? child.searchLabel : child.label;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -702,6 +703,10 @@
|
||||||
this.$emit('on-query-change', val);
|
this.$emit('on-query-change', val);
|
||||||
this.remoteMethod(val);
|
this.remoteMethod(val);
|
||||||
}
|
}
|
||||||
|
this.focusIndex = 0;
|
||||||
|
this.findChild(child => {
|
||||||
|
child.isFocus = false;
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
if (!this.selectToChangeQuery) {
|
if (!this.selectToChangeQuery) {
|
||||||
this.$emit('on-query-change', val);
|
this.$emit('on-query-change', val);
|
||||||
|
|
Loading…
Add table
Reference in a new issue