From 329b39b87db0898fce4b1a2cc13f446957b1d49a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Mon, 1 Jun 2026 15:58:52 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E4=BF=AE=E5=A4=8D=20=E5=AD=97=E5=85=B8?= =?UTF-8?q?=E6=87=92=E5=8A=A0=E8=BD=BD=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/useDict.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hooks/useDict.ts b/src/hooks/useDict.ts index 9f2f5083..4580ee0e 100644 --- a/src/hooks/useDict.ts +++ b/src/hooks/useDict.ts @@ -11,10 +11,10 @@ export function useDict(...types: string[]) { queryKey: ['dict', dictTypeKey], queryFn: () => loadDicts(dictTypes), enabled: dictTypes.length > 0, - initialData: {}, + placeholderData: {}, staleTime: 10 * 60 * 1000, gcTime: 30 * 60 * 1000 }); - return data; + return data || {}; }