Vue axios

the developer wants to manage all requests together, so axios

is introduced into the entry file.

clipboard.png

axios

clipboard.png

clipboard.png

edmservice
clipboard.png


clipboard.png

Apr.04,2021

since you are not clear about prototype, you directly use import axios. Official examples do not write axios on Vue's prototype
https://cn.vuejs.org/v2/cookb.


Vue.prototype.$axios = axios;

Vue.$axios = undefined / / true

I don't know if I understand what I'm explaining


you are hanging on Vue.prototype and need Vue.prototype.$axios to access it, or a = new Vue (); a.$axios. Go learn about the prototype chain.


use Vue.prototype.$axios.get (.)

Menu