nuxt-custom-fetch 1.0.6-alpha.1 → 1.0.6

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 CHANGED
@@ -62,6 +62,14 @@ onRequest?: ({ request, options }: {
62
62
  }) => void
63
63
  ```
64
64
 
65
+ ## 实例方法
66
+
67
+ ### http
68
+
69
+ ### get
70
+
71
+ ### post
72
+
65
73
  ```js
66
74
  import { hash } from 'ohash'
67
75
  const key = hash(JSON.stringify(restConfig) + url)
package/dist/module.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "nuxt-http-fetch",
3
3
  "configKey": "httpFetch",
4
- "version": "1.0.6-alpha.1"
4
+ "version": "1.0.6"
5
5
  }
@@ -88,9 +88,9 @@ export class HTTP {
88
88
  }, options);
89
89
  }
90
90
  get(url, config = {}, options) {
91
- return this.http(url, { method: "GET", ...config }, options);
91
+ return this.http(url, { ...config, method: "GET" }, options);
92
92
  }
93
93
  post(url, config = {}, options) {
94
- return this.http(url, { method: "POST", ...config }, options);
94
+ return this.http(url, { ...config, method: "POST" }, options);
95
95
  }
96
96
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nuxt-custom-fetch",
3
- "version": "1.0.6-alpha.1",
3
+ "version": "1.0.6",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "exports": {
@@ -18,9 +18,14 @@
18
18
  "type": "git",
19
19
  "url": "https://github.com/xjccc/nuxt-custom-fetch.git"
20
20
  },
21
+ "scripts": {
22
+ "prepack": "nuxt-module-build",
23
+ "dev": "nuxi dev playground",
24
+ "dev:build": "nuxi build playground",
25
+ "dev:prepare": "nuxt-module-build --stub && nuxi prepare playground"
26
+ },
21
27
  "dependencies": {
22
- "@nuxt/kit": "^3.0.0",
23
- "nuxt-custom-fetch": "1.0.6-alpha.1"
28
+ "@nuxt/kit": "^3.0.0"
24
29
  },
25
30
  "devDependencies": {
26
31
  "@nuxt/module-builder": "^0.2.1",
@@ -28,10 +33,5 @@
28
33
  "@nuxtjs/eslint-config-typescript": "^12.0.0",
29
34
  "eslint": "^8.29.0",
30
35
  "nuxt": "^3.0.0"
31
- },
32
- "scripts": {
33
- "dev": "nuxi dev playground",
34
- "dev:build": "nuxi build playground",
35
- "dev:prepare": "nuxt-module-build --stub && nuxi prepare playground"
36
36
  }
37
- }
37
+ }