vue-request icon indicating copy to clipboard operation
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. ⚡️ 这是一个能够轻松帮助你管理请求状态...

Results 57 vue-request issues
Sort by recently updated
recently updated
newest added

Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.4. Release notes Sourced from word-wrap's releases. 1.2.4 What's Changed Remove default indent by @​mohd-akram in jonschlinkert/word-wrap#24 🔒fix: CVE 2023 26115 (2) by @​OlafConijn in...

dependencies

useLoadMore(getTaskList, { isNoMore: (d) => { console.log(d) return d?.list.length === d?.total } }) 进入页面第一次调接口的时候 isNoMore没有触发

question
Need Reproduce
2.x

### 问题描述 Problem Description 比如我的业务接口,currentKey和pageSizeKey外边还包着一层对象: ```json { "page": { "current": 1, "pageSize": 10, }, "otherParams": {...} } ``` 是否只有开启manual,手动构建参数调用run这一条路可行? ### 其他信息 Other information 没有找到相关的issue,目前有2个思路都行不通: 1. 提供的options中,有onBefore钩子,但在不改变参数params引用地址的情况下,修改无效,实际请求携带的还是入参时的样子 2. 在defaultParams中传入了正确格式的ref对象,但发出请求的时候,usePagination自己添加的page参数页码是正确的,defaultParams中的page参数还是初始化的值。 ``` const...

question

### Bug 描述 Bug description usePagination请求的时候如果是手动请求 会丢失defaultParams 参数信息 ### 代码重现 Reproduce ```js const { refreshAsync } = usePagination(p => console.log(p), { manual: true, defaultParams: [{current: 1, pageSize: 10}] }) const...

### 需求描述 Feature Description 对 CancelablePromise 的支持 [https://github.com/alkemics/CancelablePromise](CancelablePromise) ### 建议的解决方案 Proposed Solution ``` import CancelablePromise from 'cancelable-promise'; useRequest(new CancelablePromise((resolve, reject, onCancel) => { const controller = new AbortController(); axios.get('/foo/bar', {...

### 需求描述 Feature Description 请问vue-request是否考虑未来新增分支或者仓库适配mpx框架? ### 建议的解决方案 Proposed Solution mpx框架提供响应式api([官网介绍](https://www.mpxjs.cn/guide/composition-api/reactive-api.html#%E5%93%8D%E5%BA%94%E5%BC%8F-api)),这与vue3类似,尽管它目前是利用`Object.defineProperty`实现的响应式,但根据[作者的回答](https://github.com/didi/mpx/issues/1182#issuecomment-1459712957)年内大概率会完成响应式方面的重构,即底层采用`proxy`,这更加与vue3相近。 ### 其他信息 Other information 无

### Bug 描述 Bug description 由于浏览器优化原因,当屏幕不可见时,setTimeout会延迟触发,而源码中setTimeout在轮训时使用,所以推荐使用work-times代码提setTimeout. 场景: 有一些驾驶舱页面,登陆时长比较短,通过配置轮询完成token重置,保证登陆持续性 ### 代码重现 Reproduce ### 期望结果 Desired result 轮询时间准确 ### 其他信息 Other information

Feature Request
2.x

### 需求描述 Feature Description ### 建议的解决方案 Proposed Solution ### 其他信息 Other information Reference: https://tanstack.com/query/latest/docs/vue/guides/background-fetching-indicators#displaying-global-background-fetching-loading-state

Feature Request
2.x

### 需求描述 Feature Description 如果一个地方的加载跟两个 连续request有关, request1 成功后立刻发起request2. 由于request2 的防抖 导致 request2的loading有延迟, 导致两个loading 不连续。 ### 建议的解决方案 Proposed Solution debounce 等待过程中能否把loading先设置为true 或者有另一个值来表示(比如preLoading)。 ### 其他信息 Other information ```html loading... content ``` ```javascript...

discussion
2.x

### 需求描述 Feature Description sometimes there are cases where the request to update some properties from the results returned from `data` (data that knows for sure has been updated.. for...

Feature Request
2.x