@varlet/axle 0.1.0 → 0.1.2-alpha.1689939673663
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -2
- package/README.zh-CN.md +5 -2
- package/es/useAllData.d.ts +2 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -130,7 +130,7 @@ axios.get('/url', { params: { id: 1 }, responseType: 'stream' })
|
|
|
130
130
|
axle.getStream('/url', { id: 1 })
|
|
131
131
|
```
|
|
132
132
|
|
|
133
|
-
|
|
133
|
+
### post
|
|
134
134
|
|
|
135
135
|
#### JSON
|
|
136
136
|
|
|
@@ -201,7 +201,10 @@ import { createAxle } from '@varlet/axle'
|
|
|
201
201
|
import { createUseAxle } from '@varlet/axle/use'
|
|
202
202
|
|
|
203
203
|
const axle = createAxle(/** @see https://axios-http.com **/)
|
|
204
|
-
const useAxle = createUseAxle(
|
|
204
|
+
const useAxle = createUseAxle({
|
|
205
|
+
// Optional value: Default onTransform of the useAxle
|
|
206
|
+
onTransform: response => response
|
|
207
|
+
})
|
|
205
208
|
|
|
206
209
|
const [users, getUsers, { loading, error, uploadProgress, downloadProgress, abort }] = useAxle({
|
|
207
210
|
// Request initial data
|
package/README.zh-CN.md
CHANGED
|
@@ -130,7 +130,7 @@ axios.get('/url', { params: { id: 1 }, responseType: 'stream' })
|
|
|
130
130
|
axle.getStream('/url', { id: 1 })
|
|
131
131
|
```
|
|
132
132
|
|
|
133
|
-
|
|
133
|
+
### post
|
|
134
134
|
|
|
135
135
|
#### JSON
|
|
136
136
|
|
|
@@ -201,7 +201,10 @@ import { createAxle } from '@varlet/axle'
|
|
|
201
201
|
import { createUseAxle } from '@varlet/axle/use'
|
|
202
202
|
|
|
203
203
|
const axle = createAxle(/** @see https://axios-http.com **/)
|
|
204
|
-
const useAxle = createUseAxle(
|
|
204
|
+
const useAxle = createUseAxle({
|
|
205
|
+
// 可选项: useAxle 的默认 onTransform
|
|
206
|
+
onTransform: response => response
|
|
207
|
+
})
|
|
205
208
|
|
|
206
209
|
const [users, getUsers, { loading, error, uploadProgress, downloadProgress, abort }] = useAxle({
|
|
207
210
|
// 请求初始化数据
|
package/es/useAllData.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { type Ref, type WritableComputedRef } from 'vue';
|
|
2
|
+
export declare function useAllData<T extends Ref<any>[]>(...dataCollection: T): WritableComputedRef<T[number]['value'][]>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@varlet/axle",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.1.2-alpha.1689939673663",
|
|
4
|
+
"description": "Progressive request tool based on axios",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "es/index.js",
|
|
7
7
|
"module": "es/index.js",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"axios",
|
|
27
27
|
"helpers"
|
|
28
28
|
],
|
|
29
|
-
"author": "
|
|
29
|
+
"author": "haoziqaq <357229046@qq.com>",
|
|
30
30
|
"license": "MIT",
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@varlet/shared": "^2.11.8",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@types/qs": "^6.9.7",
|
|
38
|
-
"@varlet/cli": "^2.
|
|
38
|
+
"@varlet/cli": "^2.13.1",
|
|
39
39
|
"rimraf": "^5.0.1",
|
|
40
40
|
"typescript": "^5.1.5",
|
|
41
41
|
"vue": "3.3.4"
|