1、安装 npm install axios
2、main.js
import axios from 'axios'
Vue.prototype.$axios = axios
3、使用时
this.$axios.post('/list', {
username: 'lili',
age: 20
}).then( res => {
console.log(res)
})
1、安装 npm install axios
2、main.js
import axios from 'axios'
Vue.prototype.$axios = axios
3、使用时
this.$axios.post('/list', {
username: 'lili',
age: 20
}).then( res => {
console.log(res)
})