We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
如何在全局使用axios的实例呢?
我也要出题
The text was updated successfully, but these errors were encountered:
在main.js中导入axios,将axios挂载到Vue的原型对象上。
Sorry, something went wrong.
Vue.prototype.$http=axios
在main.js文件下导入axiso,并挂载到vue实例上 import axios from 'axios'; Vue.prototype.$axios = axios;
axios,不是vue插件,没有install方法,所以不能用Vue.use注册
但你想全局使用,就在入口文件中引入,然后挂在Vue的原型链上
No branches or pull requests
如何在全局使用axios的实例呢?
我也要出题
The text was updated successfully, but these errors were encountered: