alovajs / alova

Workflow-Streamlined next-generation request tools. Extremely streamline API integration workflow, just one step
https://alova.js.org
MIT License
2.97k stars 109 forks source link

[Bug]: `useRequest` 返回的 data 得到的默认类型推断不正确 #450

Closed daiwanxing closed 4 months ago

daiwanxing commented 4 months ago

Is this a Bug?

Has this issue been reported before?

Alova Version

2.21.3

Framework

Vue

Problem Description

image

Expected Behavior

期望当没有为 method 指定泛型时,至少能推断出 Ref<any> 而不是 any

Reproduction Link

No response

Reproduction Steps

  1. 使用 useRequest stateHook
  2. 访问 data

System Information

No response

Additional Information

No response

MeetinaXD commented 4 months ago

没能复现你提到的问题,可否提供更多代码?

最好提供一个复现项目在 codepen 上以更快地解决问题,谢谢。