a1300399510@qq.com 提交于 2023/04/06 -14:40:01
This commit is contained in:
@@ -54,7 +54,7 @@ export default {
|
||||
watch: {
|
||||
historicalSearch(val, oldval) {
|
||||
if (val.length > 10) this.historicalSearch.slice(0, 10)
|
||||
localStorage.setItem('historicalSearch', JSON.stringify(val));
|
||||
this.$store.commit('setHistoricalSearch', val)
|
||||
}
|
||||
},
|
||||
|
||||
@@ -98,13 +98,6 @@ export default {
|
||||
if (this.searchText.length > 0) this.showClear = true
|
||||
else this.showClear = false
|
||||
|
||||
|
||||
// let hotSearchkeywords = ["香港大学", "香港大学"]
|
||||
// console.log(JSON.stringify(hotSearchkeywords));
|
||||
|
||||
this.historicalSearch = JSON.parse(localStorage.getItem('historicalSearch')) || []
|
||||
console.log(this.historicalSearch);
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user