From b81e7524919d284f12e1a860ecaf4161c30bd00f Mon Sep 17 00:00:00 2001 From: wangyizhi Date: Fri, 18 Jul 2025 11:07:31 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"=E2=9C=A8=20=E9=93=BE=E6=8E=A5?= =?UTF-8?q?=E5=AF=BC=E5=85=A5=E8=84=9A=E6=9C=AC=E6=97=B6=E5=8F=AF=E4=BB=A5?= =?UTF-8?q?=E6=8C=89=E5=9B=9E=E8=BD=A6=E9=94=AE=E7=A1=AE=E5=AE=9A=20(#537)?= =?UTF-8?q?"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 45a17df8f35a943a489c0f5980ac3f65fb0e8e5f. --- src/pages/components/layout/MainLayout.tsx | 23 ++++++---------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/src/pages/components/layout/MainLayout.tsx b/src/pages/components/layout/MainLayout.tsx index 72bf330f6..3a62b8c87 100644 --- a/src/pages/components/layout/MainLayout.tsx +++ b/src/pages/components/layout/MainLayout.tsx @@ -129,12 +129,6 @@ const MainLayout: React.FC<{ }); }); - const handleImport = async () => { - const urls = importRef.current!.dom.value.split("\n").filter((v) => v); - importByUrlsLocal(urls); - setImportVisible(false); - }; - return ( { @@ -153,21 +147,16 @@ const MainLayout: React.FC<{ { + const urls = importRef.current!.dom.value.split("\n").filter((v) => v); + importByUrlsLocal(urls); + setImportVisible(false); + }} onCancel={() => { setImportVisible(false); }} > - { - e.preventDefault(); // 防止输入换行 - handleImport(); - }} - /> +
ScriptCat