Skip to content

Commit 1bdca1b

Browse files
committed
1.0.0
1 parent 60b8cd0 commit 1bdca1b

File tree

6 files changed

+19
-2
lines changed

6 files changed

+19
-2
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,24 @@ Vue.axios.get(api).then((response) => {
2828
console.log(response.data)
2929
})
3030

31+
Vue.$axios.get(api).then((response) => {
32+
console.log(response.data)
33+
})
34+
3135
this.axios.get(api).then((response) => {
3236
console.log(response.data)
3337
})
3438

39+
this.$axios.get(api).then((response) => {
40+
console.log(response.data)
41+
})
42+
3543
this.$http.get(api).then((response) => {
3644
console.log(response.data)
3745
})
3846
```
3947

4048
Please kindly check full documention of [axios](https://github.com/axios/axios) too
49+
50+
### Thanks
51+
https://github.com/imcvampire/vue-axios

dist/vve-vue-axios.es5.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
2424

2525
Vue.axios = axios;
2626

27+
Vue.$axios = axios;
28+
2729
Object.defineProperties(Vue.prototype, {
2830

2931
axios: {

dist/vve-vue-axios.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ declare module "vue/types/vue" {
1111

1212
interface VueConstructor {
1313
axios: AxiosInstance;
14+
$axios: AxiosInstance;
1415
}
1516
}
1617

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"types": "index.d.ts",
77
"scripts": {
88
"test": "npm run test",
9-
"build": "gulp"
9+
"build": "gulp",
10+
"release": "git commit -am %npm_package_version% && git tag v%npm_package_version% && git push && git push --tags && echo 'i Run `npm publish` to publish'"
1011
},
1112
"typing": "index.d.ts",
1213
"files": [

src/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ function plugin(Vue, axios) {
2020

2121
Vue.axios = axios
2222

23+
Vue.$axios = axios
24+
2325
Object.defineProperties(Vue.prototype, {
2426

2527
axios: {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy