@jetlinks-web/core 2.0.1 → 2.0.2
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/package.json +3 -3
- package/src/axios.ts +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jetlinks-web/core",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.ts",
|
|
6
6
|
"module": "index.ts",
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
"license": "ISC",
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"axios": "^1.7.4",
|
|
19
|
-
"@jetlinks-web/constants": "^1.0.
|
|
19
|
+
"@jetlinks-web/constants": "^1.0.3",
|
|
20
20
|
"@jetlinks-web/types": "^1.0.2",
|
|
21
|
-
"@jetlinks-web/utils": "^1.
|
|
21
|
+
"@jetlinks-web/utils": "^1.2.1"
|
|
22
22
|
},
|
|
23
23
|
"publishConfig": {
|
|
24
24
|
"registry": "https://registry.npmjs.org/",
|
package/src/axios.ts
CHANGED
|
@@ -150,7 +150,7 @@ export const crateAxios = (options: Options) => {
|
|
|
150
150
|
)
|
|
151
151
|
}
|
|
152
152
|
|
|
153
|
-
export const post = <T = any>(url: string, data: any =
|
|
153
|
+
export const post = <T = any>(url: string, data: any = {}, ext?: any) => {
|
|
154
154
|
return (instance<any, AxiosResponseRewrite<T>>({
|
|
155
155
|
method: 'POST',
|
|
156
156
|
url,
|
|
@@ -168,7 +168,7 @@ export const get = <T = any>(url: string, params: any = undefined, ext?: any) =>
|
|
|
168
168
|
})
|
|
169
169
|
}
|
|
170
170
|
|
|
171
|
-
export const put = <T = any>(url: string, data: any =
|
|
171
|
+
export const put = <T = any>(url: string, data: any = {}, ext?: any) => {
|
|
172
172
|
return instance<any, AxiosResponseRewrite<T>>({
|
|
173
173
|
method: 'PUT',
|
|
174
174
|
url,
|
|
@@ -177,7 +177,7 @@ export const put = <T = any>(url: string, data: any = undefined, ext?: any) => {
|
|
|
177
177
|
})
|
|
178
178
|
}
|
|
179
179
|
|
|
180
|
-
export const patch = <T = any>(url: string, data: any =
|
|
180
|
+
export const patch = <T = any>(url: string, data: any = {}, ext?: any) => {
|
|
181
181
|
return instance<any, AxiosResponseRewrite<T>>({
|
|
182
182
|
method: 'patch',
|
|
183
183
|
url,
|