举例在钩子函数mounted中
mounted(){
//由于this在回调函数中指向不同并非是vue实例所以先赋值给_this
var _this=this
this.axios.post('https://www.easy-mock.com/mock/5c2dc796c8bc2e49abfeaa30/nurse/nurse_infor')
.then(function (response) {
_this.showData=response.data.data
})
.catch(function (error) {
console.log(error)
});
},