From 5f25fecafbdc5044be16f13360923050925787a2 Mon Sep 17 00:00:00 2001 From: Aresn Date: Mon, 7 Jan 2019 14:28:43 +0800 Subject: [PATCH] Update select.vue --- src/components/select/select.vue | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/components/select/select.vue b/src/components/select/select.vue index 8a7752a6..18ace4d4 100644 --- a/src/components/select/select.vue +++ b/src/components/select/select.vue @@ -639,12 +639,15 @@ // in 'AutoComplete', when set an initial value asynchronously, // the 'dropdown list' should be stay hidden. // [issue #5150] - let isInputFocused = - document.hasFocus && - document.hasFocus() && - document.activeElement === this.$el.querySelector('input'); - - this.visible = isInputFocused; + if (this.autoComplete) { + let isInputFocused = + document.hasFocus && + document.hasFocus() && + document.activeElement === this.$el.querySelector('input'); + this.visible = isInputFocused; + } else { + this.visible = true; + } } this.query = query;