修复错误单词,修复slug页错误的allPosts
This commit is contained in:
tangly1024
2021-11-04 14:06:32 +08:00
parent 3cb42c5ea9
commit 40db3aae2b
5 changed files with 14 additions and 12 deletions

View File

@@ -17,8 +17,10 @@ const SearchInput = ({ currentTag, currentSearch }) => {
}
}
const handleKeyUp = (e) => {
if (e.keyCode === 13) {
if (e.keyCode === 13) { // 回车
handleSearch(searchInputRef.current.value)
} else if (e.keyCode === 27) { // ESC
cleanSearch()
}
}
const cleanSearch = () => {