mirror of
https://gitee.com/JavaLionLi/plus-ui.git
synced 2026-09-13 07:43:43 +08:00
fix 修复 字典懒加载问题
This commit is contained in:
parent
97f75f7d6e
commit
329b39b87d
@ -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 || {};
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user