From c6f964c921043c2f4caf29b6c8df41e963f7841e Mon Sep 17 00:00:00 2001 From: shadowcz007 Date: Thu, 4 Jan 2024 12:57:55 +0800 Subject: [PATCH] =?UTF-8?q?textarea=E8=BE=93=E5=85=A5=EF=BC=8C=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E4=B8=8A=E4=B8=80=E6=AC=A1=20=E8=BE=93=E5=85=A5?= =?UTF-8?q?=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/index.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/index.html b/web/index.html index fa3284c..2c117ef 100644 --- a/web/index.html +++ b/web/index.html @@ -980,8 +980,9 @@ // Create an input field for the image name const textInput = document.createElement("textarea"); + // textInput.className=; // uploadImageInput.type = "text"; - textInput.value = data.inputs.text; + textInput.value = localStorage.getItem(`t_${data.id}`) || data.inputs.text; uploadContainer.appendChild(textInput); function autoResize(textarea) { @@ -993,6 +994,7 @@ // console.log(textInput.value) autoResize(textInput); window._appData.data[data.id].inputs.text = textInput.value; + localStorage.setItem(`t_${data.id}`, textInput.value); }) // Append the upload container to the main container