细节优化

This commit is contained in:
2025-10-12 23:03:51 +08:00
parent 09c77a809b
commit 6a5191df21
14 changed files with 143 additions and 54 deletions

View File

@@ -46,11 +46,11 @@ const QueryTransactions = () => {
getSearchHistory();
}, []);
useEffect(() => {
if (ref?.current) {
ref.current.focus();
}
}, [ref.current]);
// useEffect(() => {
// if (ref?.current) {
// ref.current.focus();
// }
// }, [ref.current]);
useReachBottom(() => {
if (load_transactions_params.page >= totalpages) return;
@@ -99,7 +99,8 @@ const QueryTransactions = () => {
/**
* @description 点击清空输入内容
*/
const handleClear = () => {
const handleClear = (e) => {
e.stopPropagation();
setKeyword("");
setTransactions([]);
set_load_transactions_params((prev) => {
@@ -247,7 +248,7 @@ const QueryTransactions = () => {
defaultValue={keyword}
onChange={handleChange}
onClear={handleClear}
autoFocus
onBlur={() => {setKeyword(load_transactions_params.keyword)}}
clearable={false}
ref={ref}
/>