if (this.timer === null) {
this.timer = setTimeout(() => {
//执行搜索
}, 1000)
} else {
clearTimeout(this.timer)
this.timer = setTimeout(() => {
//执行搜索
}, 1000)
}
if (this.timer === null) {
this.timer = setTimeout(() => {
//执行搜索
}, 1000)
} else {
clearTimeout(this.timer)
this.timer = setTimeout(() => {
//执行搜索
}, 1000)
}