Open
Description
问题描述 Problem Description
useRequest 函数执行后返回的 data 不是 shallowRef 吗,是文档写的不对吗
版本:2.0.4
文档上写的是:https://www.attojs.com/api/#data
data
类型: shallowRef<R | undefined>
默认值: undefined
接口返回的数据。
并且 node_modules 里面的 index.d.ts 中定义的
type State<R, P> = {
loading: Ref;
data: Ref<R | undefined>;
error: Ref<Error | undefined>;
params: Ref
;
};
data 却是 Ref
并且 vs code 中 data 提示的类型也是 Ref