mirror of
https://gitee.com/JavaLionLi/plus-ui.git
synced 2026-09-15 00:25:07 +08:00
fix 修复 字典懒加载问题
This commit is contained in:
parent
97f75f7d6e
commit
329b39b87d
@ -11,10 +11,10 @@ export function useDict(...types: string[]) {
|
|||||||
queryKey: ['dict', dictTypeKey],
|
queryKey: ['dict', dictTypeKey],
|
||||||
queryFn: () => loadDicts(dictTypes),
|
queryFn: () => loadDicts(dictTypes),
|
||||||
enabled: dictTypes.length > 0,
|
enabled: dictTypes.length > 0,
|
||||||
initialData: {},
|
placeholderData: {},
|
||||||
staleTime: 10 * 60 * 1000,
|
staleTime: 10 * 60 * 1000,
|
||||||
gcTime: 30 * 60 * 1000
|
gcTime: 30 * 60 * 1000
|
||||||
});
|
});
|
||||||
|
|
||||||
return data;
|
return data || {};
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user