添加memorize localStorage本地存储功能
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-10-31 18:35:32 +08:00
parent ff80556e8c
commit f283695f8f
5 changed files with 27 additions and 23 deletions

View File

@@ -51,6 +51,9 @@ export default function Edit({ setPage, wordData, setWordData }: Props) {
setWordData(newWordData);
if (textareaRef.current)
textareaRef.current.value = convertFromWordData(newWordData);
if(localStorage) {
localStorage.setItem("wordData", JSON.stringify(newWordData));
}
};
const handleChange = (e: ChangeEvent<HTMLTextAreaElement>) => {
input = e.target.value;