From 228b6e4aecb7a6e5d7c7d6200faaa8d442304166 Mon Sep 17 00:00:00 2001 From: LiaoYijun Date: Tue, 19 Aug 2025 17:02:03 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BD=BF=E7=94=A8=20App.messge=20?= =?UTF-8?q?=E6=9B=BF=E6=8D=A2=20messageApi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/accounts/SnippetList.jsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/views/accounts/SnippetList.jsx b/src/views/accounts/SnippetList.jsx index 9cd3e1d7..4e6949a 100644 --- a/src/views/accounts/SnippetList.jsx +++ b/src/views/accounts/SnippetList.jsx @@ -7,7 +7,7 @@ import useSnippetStore from '@/stores/SnippetStore' import useAuthStore from '@/stores/AuthStore' function SnippetList() { - const [messageApi, contextHolder] = message.useMessage() + const { message, notification } = App.useApp() const [searchform] = Form.useForm() const [snippetForm] = Form.useForm() @@ -32,7 +32,6 @@ function SnippetList() { const [loginUser] = useAuthStore((state) => [state.loginUser]) - const { notification } = App.useApp() const [isSnippetModalOpen, setSnippetModalOpen] = useState(false) const [isHtmlLoading, setHtmlLoading] = useState(false) @@ -236,14 +235,13 @@ function SnippetList() { value={currentSnippet.content} loading={isHtmlLoading} onEdit={() => handelSnippetEdit()} - onCopied={() => messageApi.success('已复制')} + onCopied={() => message.success('已复制😀')} onDelete={() => handelSnippetDelete()} />
- {contextHolder} ) }