From 3d82b5c83f9943479f1021723238f4e1ecc47504 Mon Sep 17 00:00:00 2001 From: wangwenrui Date: Thu, 20 Feb 2020 18:22:45 +0800 Subject: [PATCH] =?UTF-8?q?pref:new=20chart=E9=AB=98=E5=BA=A6=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E8=BE=93=E5=85=A5=E6=A1=86=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nezha-fronted/src/components/page/dashboard/chartBox.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nezha-fronted/src/components/page/dashboard/chartBox.vue b/nezha-fronted/src/components/page/dashboard/chartBox.vue index 6da83149c..ff171c33e 100644 --- a/nezha-fronted/src/components/page/dashboard/chartBox.vue +++ b/nezha-fronted/src/components/page/dashboard/chartBox.vue @@ -655,8 +655,8 @@ querySearch(queryString, cb) { console.log(queryString) var suggestions = this.heightSuggestions; - var results = queryString ? suggestions.filter(this.createFilter(queryString)) : suggestions; - console.log(results) + // var results = queryString ? suggestions.filter(this.createFilter(queryString)) : suggestions; + var results=queryString&&(suggestions.includes(queryString)||suggestions.filter(this.createFilter(queryString)).length>0)?suggestions:[]; // 调用 callback 返回建议列表的数据 cb(results); },