From d2d056abd553ab8d380e67230fcbfc6c94f56611 Mon Sep 17 00:00:00 2001 From: ggchinazhangwei <714349513@qq.com> Date: Wed, 16 Apr 2025 18:18:28 +0800 Subject: [PATCH] feat --- src/pages/user/index.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/pages/user/index.tsx b/src/pages/user/index.tsx index a40dc25..961f8f6 100644 --- a/src/pages/user/index.tsx +++ b/src/pages/user/index.tsx @@ -86,6 +86,13 @@ export default function CodeEditor() { saveAs(file); }, [htmlContent]); + const downloadcss = useCallback(() => { + const file = new File([htmlContent], `${Date.now()}.html`, { + type: "text/css;charset=utf-8", + }); + saveAs(file); + }, [htmlContent]); + // 快捷键保存 useHotkeys( "ctrl+s",