Files
rustfs-console/composables/useAPI.ts
T
junxiang Mu c019276fcb add kms
Signed-off-by: junxiang Mu <1948535941@qq.com>
2025-09-22 14:31:07 +08:00

9 lines
240 B
TypeScript

import type { UseFetchOptions } from 'nuxt/app';
export function useAPI<T>(url: string | (() => string), options?: UseFetchOptions<T>) {
return useFetch(url, {
...options,
$fetch: useNuxtApp().$apiFetch as typeof $fetch,
});
}