diff --git a/packages/select/src/select.vue b/packages/select/src/select.vue index 1ce8dcda6..44b3744d4 100644 --- a/packages/select/src/select.vue +++ b/packages/select/src/select.vue @@ -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; } diff --git a/test/unit/specs/select.spec.js b/test/unit/specs/select.spec.js index fe03b45e0..2feb95786 100644 --- a/test/unit/specs/select.spec.js +++ b/test/unit/specs/select.spec.js @@ -626,6 +626,7 @@ describe('Select', () => { remoteMethod }); const select = vm.$children[0]; + select.handleQueryChange(''); vm.$nextTick(() => { select.handleQueryChange('面'); setTimeout(() => {