Skip to content
New issue

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

Vue.prototype.axios = axios;报错 #17

Open
wuyadream opened this issue Aug 23, 2017 · 2 comments
Open

Vue.prototype.axios = axios;报错 #17

wuyadream opened this issue Aug 23, 2017 · 2 comments

Comments

@wuyadream
Copy link

错误提示为:Cannot set property axios of #<Vue$3> which has only a getter at eval ,都是按照readme文档来搭建的。然后提示这个错误

@superman66
Copy link
Owner

你试试这样:

Vue.prototype.$axios = axios;

如果还有问题的话,提供下你 vue 的版本信息

@wuyadream
Copy link
Author

修改后赋值语句没有问题了,但是在访问的时候报错了:
this.$axios.post is not a function。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants