From c8a9e2dd6032a3ffaa7cad8e2dc32de03c905e9c Mon Sep 17 00:00:00 2001 From: fanxb Date: Mon, 19 Apr 2021 15:08:56 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E6=A1=86=E6=97=A0=E6=B3=95=E8=BE=93=E5=85=A5=E4=B8=AD=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bookmark_front/src/components/main/Search.vue | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/bookmark_front/src/components/main/Search.vue b/bookmark_front/src/components/main/Search.vue index 4f8bbd7..609a7e9 100644 --- a/bookmark_front/src/components/main/Search.vue +++ b/bookmark_front/src/components/main/Search.vue @@ -50,15 +50,14 @@ export default { }, methods: { search(content) { - content = content.target.value; - content = content.toLocaleLowerCase().trim(); - this.value = content; - if (content === "") { + this.value = content.target.value; + let val = content.target.value.toLocaleLowerCase().trim(); + if (val === "") { this.list = []; return; } let time1 = Date.now(); - this.list = this.dealSearch(content); + this.list = this.dealSearch(val); this.selectIndex = 0; console.info("搜索耗时:" + (Date.now() - time1)); },