|
@@ -67,7 +67,8 @@
|
|
|
// 存储历史数据
|
|
|
let index = this.searchHistory.findIndex(item => item.name === this.keyword);
|
|
|
// console.log('index',index);
|
|
|
- if (index !== -1) {
|
|
|
+ console.log('11',this.keyword.length<1);
|
|
|
+ if (index !== -1||this.keyword.length<1) {
|
|
|
this.goSearch(this.keyword)
|
|
|
// 已经存在,不用重复添加了
|
|
|
return;
|