@uni-helper/axios-adapter 1.5.3 → 1.16.0
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 +3 -3
- package/dist/chunk-CKQMccvm.cjs +28 -0
- package/dist/index.cjs +299 -337
- package/dist/index.d.cts +15 -14
- package/dist/index.d.ts +15 -14
- package/dist/index.js +293 -328
- package/dist/types-BSLo1MIA.d.cts +7 -0
- package/dist/types-C-Kh3_5J.d.ts +7 -0
- package/dist/unplugin-B0XXJPh7.cjs +27 -0
- package/dist/unplugin-GFuC6tIl.js +21 -0
- package/dist/vite.cjs +3 -7
- package/dist/vite.d.cts +5 -5
- package/dist/vite.d.ts +6 -5
- package/dist/vite.js +3 -4
- package/dist/webpack.cjs +3 -7
- package/dist/webpack.d.cts +3 -3
- package/dist/webpack.d.ts +4 -3
- package/dist/webpack.js +3 -4
- package/package.json +18 -20
- package/dist/chunk-IWHKX3RU.cjs +0 -43
- package/dist/chunk-MB4L234N.js +0 -37
- package/dist/types-76de936f.d.ts +0 -10
package/README.md
CHANGED
|
@@ -36,8 +36,8 @@ pnpm i @uni-helper/axios-adapter axios
|
|
|
36
36
|
### 基本用法
|
|
37
37
|
|
|
38
38
|
```ts
|
|
39
|
-
import axios from 'axios'
|
|
40
39
|
import { createUniAppAxiosAdapter } from '@uni-helper/axios-adapter'
|
|
40
|
+
import axios from 'axios'
|
|
41
41
|
|
|
42
42
|
axios.defaults.adapter = createUniAppAxiosAdapter()
|
|
43
43
|
```
|
|
@@ -45,8 +45,8 @@ axios.defaults.adapter = createUniAppAxiosAdapter()
|
|
|
45
45
|
或者创建自定义实例
|
|
46
46
|
|
|
47
47
|
```ts
|
|
48
|
-
import axios from 'axios'
|
|
49
48
|
import { createUniAppAxiosAdapter } from '@uni-helper/axios-adapter'
|
|
49
|
+
import axios from 'axios'
|
|
50
50
|
|
|
51
51
|
const instance = axios.create({ adapter: createUniAppAxiosAdapter() })
|
|
52
52
|
```
|
|
@@ -54,8 +54,8 @@ const instance = axios.create({ adapter: createUniAppAxiosAdapter() })
|
|
|
54
54
|
### 与 [useAxios](https://vueuse.org/integrations/useAxios/) 一起使用
|
|
55
55
|
|
|
56
56
|
```ts
|
|
57
|
-
import axios from 'axios'
|
|
58
57
|
import { createUniAppAxiosAdapter } from '@uni-helper/axios-adapter'
|
|
58
|
+
import axios from 'axios'
|
|
59
59
|
|
|
60
60
|
axios.defaults.adapter = createUniAppAxiosAdapter()
|
|
61
61
|
const { data, isFinished } = useAxios('/posts')
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
10
|
+
key = keys[i];
|
|
11
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
12
|
+
get: ((k) => from[k]).bind(null, key),
|
|
13
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
19
|
+
value: mod,
|
|
20
|
+
enumerable: true
|
|
21
|
+
}) : target, mod));
|
|
22
|
+
//#endregion
|
|
23
|
+
Object.defineProperty(exports, "__toESM", {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
get: function() {
|
|
26
|
+
return __toESM;
|
|
27
|
+
}
|
|
28
|
+
});
|