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