problem description
I use jquery to get the data to assign data values to Vue, and the assignment is successful. But no data is displayed using v-for traversal.
the environmental background of the problems and what methods you have tried
Vue+bootstrap+jquery
related codes
/ / Please paste the code text below (do not replace the code with pictures)
var chara = new Vue ({
el:"-sharpcontainer",
data:{
items:"",
},
})
$(function () {
$.post(
"/Project_web/chara/getAllData",
function(data){
var json = JSON.stringify(data.result);
chara.items = json;
alert(chara.items);
},
"json"
)
})
this is the js code
here is the code for the jsp page
< tbody >
<tr v-for="item in items">
<td>{{item.id}}</td>
<td>{{item.charName}}</td>
<td>{{item.charType}}</td>
<td>{{item.charDescrible}}</td>
<td>{{item.charStatus}}</td>
<td></td>
</tr>
< / tbody >
what result do you expect? What is the error message actually seen?
the display effect is as follows: