chore: profile config

This commit is contained in:
jialin
2026-01-30 18:48:55 +08:00
parent 8f2eea70f6
commit 1a2e82f079
27 changed files with 730 additions and 231 deletions
@@ -0,0 +1,25 @@
import { useQueryDataList } from '@/hooks/use-query-data-list';
import { queryGpuDevicesList } from '../apis';
import { GPUDeviceItem as ListItem } from '../config/types';
export const useQueryGPUs = (optons?: {
getLabel?: (item: ListItem) => string;
getValue?: (item: ListItem) => any;
}) => {
const { dataList, loading, fetchData, cancelRequest } = useQueryDataList<
ListItem,
Global.SearchParams
>({
key: 'gpuList',
fetchList: queryGpuDevicesList
});
return {
dataList,
loading,
fetchData,
cancelRequest
};
};
export default useQueryGPUs;