Vue使用axios Cannot read property 'protocol' of undefined!
当url是undefined时
当使用Vue.use(axios)时,
正确使用
main.js引入
import axios from 'axios'
Vue.prototype.$http = axios
组件中使用:
this.$http.post()
当url是undefined时
当使用Vue.use(axios)时,
正确使用
main.js引入
import axios from 'axios'
Vue.prototype.$http = axios
组件中使用:
this.$http.post()