fix:navigate error when search keyword change

This commit is contained in:
黄云飞
2022-09-22 17:57:42 +08:00
parent c16d07659a
commit 32277bc60c
@@ -34,10 +34,8 @@ export class Search {
public setSearchKeyword(payload: string | null) { public setSearchKeyword(payload: string | null) {
this.searchKeyword = payload this.searchKeyword = payload
if (!payload) {
this.searchNavigateIndex = null this.searchNavigateIndex = null
} }
}
public searchNavigatePre(): number | null { public searchNavigatePre(): number | null {
if (!this.searchMatchList.length || !this.searchKeyword) return null if (!this.searchMatchList.length || !this.searchKeyword) return null