Vue+jquery . Send a request to update the data with $.ajax. the data has been updated, but the page has not changed.

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

Feb.22,2022

the problem pointed to by this. The code is as follows:

 

his.myData = res [1];

Change

to
this.myData.push (.res [1])
pay attention to the context

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b39586-2aecc.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b39586-2aecc.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?