8000 [Need Help] useRequest 函数执行后返回的 data 不是 shallowRef 吗,是文档写的不对吗 · Issue #259 · AttoJS/vue-request · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
8000 Skip to content
[Need Help] useRequest 函数执行后返回的 data 不是 shallowRef 吗,是文档写的不对吗 #259
Open
@json-66

Description

@json-66

问题描述 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

其他信息 Other information

Image

Image

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0