useFetchRaw.ts 320 B

1234567891011121314
  1. import { useFetch as _useFetch } from '#app'
  2. export async function useFetchRaw<T = any>(url: string, options?: any) {
  3. const { data, error, pending, refresh, execute } = await _useFetch<T>(url, options)
  4. return {
  5. data: {
  6. _rawValue: data.value,
  7. },
  8. error,
  9. pending,
  10. refresh,
  11. execute,
  12. }
  13. }