筛选组件-下拉框样式适配 新增搜索记录在最前端

This commit is contained in:
2023-08-01 15:47:15 +08:00
parent 2eaa6a6b9c
commit f93ddbbc32
2 changed files with 1 additions and 3 deletions

View File

@@ -172,7 +172,7 @@ 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)
historyArr.data.unshift(seachAllType.keyword)
}
localStorage.setItem('historyArr', JSON.stringify(historyArr.data));
sessionStorage.setItem('houseingPageType',routePath.value === '/needHousing' ? '6' : routePath.value === '/intermediaryHousing' ? '1' : routePath.value === '/personHousing' ? '0' : '0')