搜索框为空不能搜索
This commit is contained in:
parent
6e93d4de52
commit
b336d86af1
@ -170,10 +170,11 @@ historyArr.data = JSON.parse(localStorage.getItem('historyArr')) || []
|
||||
//搜索数据
|
||||
let seachList = (item) => {
|
||||
let string = seachAllType.keyword
|
||||
if (!string.replace(/\s/g, "")) return
|
||||
if (historyArr.data.indexOf(seachAllType.keyword) === -1) {
|
||||
historyArr.data.push(seachAllType.keyword)
|
||||
}
|
||||
if (string.replace(/\s/g, "")) localStorage.setItem('historyArr', JSON.stringify(historyArr.data));
|
||||
localStorage.setItem('historyArr', JSON.stringify(historyArr.data));
|
||||
route.push({
|
||||
path: '/seachPage',
|
||||
query: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user