input(e){
clearTimeout(this.timer)
this.timer=setTimeout(()=>{
this.kw=e
this.getSearchList()
},500)
v-if="searchResults.length!==0"
// 把数组转换为set对象
const set = new Set(this.historyList)
// 移除对应的元素
set.delete(this.kw)
//添加对应的元素
set.add(this.kw)
// 把set对象转换为数组
this.historyList=Array.from(set)
//调用uni.setStorageSync(key,value)
uni.setStorageSync('kw',JSON.stringify(this.historyList))
//与data平级
onLoad(){
this.historyList=JSON.parse(uni.getStorageSync('kw')||'[]')
}