vue-request
vue-request copied to clipboard
⚡️ This is a library that can easily help you manage request states, supporting common features such as SWR, polling, error retry, caching, and pagination, etc. ⚡️ 这是一个能够轻松帮助你管理请求状态...
### Bug 描述 Bug description `customerEdit`是一个promise接口,我如下使用: ```js const { loading, run: customerEditRun } = useRequest(customerEdit) customerEditRun(params).then(() => { // 无论接口正确还是错误全都走到了这里 }) ``` 无论接口正确还是错误全都走到了注释位置,但我直接使用`customerEdit`是没问题的 ### 代码重现 Reproduce ### 期望结果 Desired result...
### Bug 描述 Bug description 1.2.4 版本,使用 useLoadMore 在服务端运行时,会有内存泄漏 ### 代码重现 Reproduce https://github1s.com/AttoJS/vue-request/blob/HEAD/src/core/utils/listener.ts#L9 https://github1s.com/AttoJS/vue-request/blob/HEAD/src/core/useAsyncQuery.ts#L242 ### 期望结果 Desired result ### 其他信息 Other information   原因是服务端没有 onUnmount 事件,导致 Set 越加越多
# 正式版已发布 ## 文档 - [English](https://www.attojs.org/) - [中文文档](https://www.attojs.com/) ## 安装 ```bash yarn add vue-request # or npm add vue-request ``` ## 变更列表 - 使用 `vue-demi` 兼容 vue2 #38 - 新增自定义缓存...
### 需求描述 全局配置GlobalOptions不能配置onError ### 希望能和ahooks 一样,提供统一的error配置
### 问题描述 Problem Description 无法在在线网站引入最新版的 vue-request ### 其他信息 Other information https://stackblitz.com/edit/vue-ef8dj8?file=src%2Fcomponents%2FHelloWorld.vue,package.json,src%2FApp.vue,src%2Fmain.js
Bumps [terser](https://github.com/terser/terser) from 5.6.1 to 5.14.2. Changelog Sourced from terser's changelog. v5.14.2 Security fix for RegExps that should not be evaluated (regexp DDOS) Source maps improvements (#1211) Performance improvements in...
### 问题描述 Problem Description 请求出现错误正常应该是在最后一次进行错误提示。 Axios 有请求错误拦截,但无法区分是否是错误重试的最后一次。除了在每个 useRequest 去捕获错误之外,有没有全局拦截到错误的办法? 如果暂时没办法实现,我提个建议,在 Service 请求函数传入一个参数,标识是否是重试请求或请求重试最后一次之类的。谢谢
Does `useRequest` support ``? When I use it in the keep-alive component, it's always called back.
### 需求描述 Feature Description If `initialData` is given, the result type should not have the `undefined` part. The `ref` function in `vue` is a good example: ```ts export declare function...
### 需求描述 Feature Description #### 1. [`Options.ready`](https://next.attojs.com/api/#ready) 检测truthy 在依赖请求中比较有用。目前`ready`只接受`Ref`,所以不能直接传`Ref`,需要写`computed`。希望可以接受`Ref`并检测truthy。 ```ts const api1Context = useRequest(api1); /* const api2Context = useRequest(api2, { ready: api1Context.data, // 类型错误 }; */ const isApi1Ready = computed(()...