npm install axios
在 main.vue中首先引入
import axios from ‘axios’
然后调用
Vue.prototype.$Axios = axios;
在组件中可以使用
this.$Axios.post(‘http://example.com’,{
//parameter
})
.then(response=>{
//funciton()
});
电子邮件地址不会被公开。 必填项已用*标注
评论
姓名 *
电子邮件 *
站点