code is as follows:
new Vue ({
methods: {
post: function (url, data) {
$.ajax({
type: "POST",
url: "...."+url+".ashx",
data:data,
})
}
},
created () {
this.post("XXX", "XXX").done(function(res){
console.log(res)
})
}
})
error: this.post (.) Is undefined
doesn"t know enough about vue. Why can"t we call the post method of methods here? because how to write to get the post method, ask for expert advice