历史搜索最大10条 瀑布流组件图标修改 筛选样式修改

This commit is contained in:
2023-08-09 16:12:12 +08:00
parent f672a7fc6e
commit d93bfd648c
3 changed files with 7 additions and 3 deletions

View File

@@ -178,6 +178,7 @@ let seachList = (item) => {
if (historyArr.data.indexOf(seachAllType.keyword) === -1) {
historyArr.data.unshift(seachAllType.keyword)
}
if(historyArr.data.length>10)historyArr.data.splice(historyArr.data.length-1,1)
localStorage.setItem('historyArr', JSON.stringify(historyArr.data));
sessionStorage.setItem('houseingPageType', routePath.value === '/needHousing' ? '6' : routePath.value === '/intermediaryHousing' ? '1' : routePath.value === '/personHousing' ? '0' : '0')
route.push({
@@ -236,6 +237,7 @@ let deleteSeachVal=(i)=>{
let setHotSeach = (item) => {
seachAllType.keyword = item
if (historyArr.data.indexOf(item) === -1) historyArr.data.unshift(item)
if(historyArr.data.length>10)historyArr.data.slice(historyArr.data.length-1,1)
localStorage.setItem('historyArr', JSON.stringify(historyArr.data));
seachList()
}