mirror of https://github.com/ElemeFE/element
Select: remove unnecessary remote query when focused (#9998)
parent
067a9be7d1
commit
62b0e2ace9
|
@ -406,7 +406,10 @@
|
|||
methods: {
|
||||
handleQueryChange(val) {
|
||||
if (this.previousQuery === val) return;
|
||||
if (this.previousQuery === null && typeof this.filterMethod === 'function') {
|
||||
if (
|
||||
this.previousQuery === null &&
|
||||
(typeof this.filterMethod === 'function' || typeof this.remoteMethod === 'function')
|
||||
) {
|
||||
this.previousQuery = val;
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -626,6 +626,7 @@ describe('Select', () => {
|
|||
remoteMethod
|
||||
});
|
||||
const select = vm.$children[0];
|
||||
select.handleQueryChange('');
|
||||
vm.$nextTick(() => {
|
||||
select.handleQueryChange('面');
|
||||
setTimeout(() => {
|
||||
|
|
Loading…
Reference in New Issue