problem description
vue+jquery. Send a request to update the data with $.ajax, the data has been updated, but the page has not changed
related codes
data: {
myData:[];
}
methods:{
get:function(){
$.ajax({
url: "http://XXXX",
type: "GET",
data:{},
success: function(res){
// console.log(res[1]);
his.myData = res[1];
console.log(this.myData);
},
})
}
}
<ul>
<li class="text-left" v-for="(item, index) of myData">{{item}}</li>
</ul>
<p class="text-info" v-show="myData.length == 0">...
result
result console.log (this.myData) has been updated, but the view has not been updated and still shows that there is no data yet