From 3cd8b22b8985328ffd452e80f27e359da5eaaf69 Mon Sep 17 00:00:00 2001 From: fanxb Date: Wed, 31 Mar 2021 16:00:28 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E7=AD=9B=E9=80=89?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bookmark_front/src/components/main/Search.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bookmark_front/src/components/main/Search.vue b/bookmark_front/src/components/main/Search.vue index 6cdeec0..4f8bbd7 100644 --- a/bookmark_front/src/components/main/Search.vue +++ b/bookmark_front/src/components/main/Search.vue @@ -71,7 +71,11 @@ export default { this.list = []; this.selectIndex = null; }, - searchClick() { + searchClick(value, e) { + //如果是enter按键触发的不作处理 + if (e && e.key) { + return; + } if (this.timer != null) { clearTimeout(this.timer); } @@ -90,7 +94,7 @@ export default { if (e) { this.stopDefault(e); } - if (!index) { + if (index === undefined || index === null) { return; } let bookmark = this.list[index];