From 14423e0eb3dca9c365e37987813afae5652e6a24 Mon Sep 17 00:00:00 2001 From: lyswhut Date: Sun, 27 Oct 2019 10:00:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=90=9C=E7=B4=A2=E6=A1=86bu?= =?UTF-8?q?g?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- publish/changeLog.md | 1 + src/renderer/components/core/Toolbar.vue | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/publish/changeLog.md b/publish/changeLog.md index cf657ab7..c2054ff4 100644 --- a/publish/changeLog.md +++ b/publish/changeLog.md @@ -6,3 +6,4 @@ #### 修复 - 修复搜索提示失效的问题 +- 修复从歌单或列表点击搜索按钮搜索目标歌曲时,搜索框未聚焦仍然弹出候选搜索列表的问题 diff --git a/src/renderer/components/core/Toolbar.vue b/src/renderer/components/core/Toolbar.vue index 9d2ed72a..1549524c 100644 --- a/src/renderer/components/core/Toolbar.vue +++ b/src/renderer/components/core/Toolbar.vue @@ -23,6 +23,7 @@ export default { visibleList: false, tipList: [], tipSearch: null, + isFocused: false, } }, computed: { @@ -64,10 +65,12 @@ export default { handleEvent({ action, data }) { switch (action) { case 'focus': + this.isFocused = true if (!this.visibleList) this.visibleList = true if (this.searchText) this.handleTipSearch() break case 'blur': + this.isFocused = false setTimeout(() => { if (this.visibleList) this.visibleList = false }, 50) @@ -84,7 +87,7 @@ export default { }, handleTipSearch() { - if (!this.visibleList) this.visibleList = true + if (!this.visibleList && this.isFocused) this.visibleList = true this.tipSearch() },