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); },