var app3 = new Vue ({
el:"-sharpitem",
data:{
item_data:[
],
},
computed:{
},
methods: {
}
});
I want to change the item_data of vue when I click. This is the data. If it can be printed, it is rendered on the page.
goods_box is li
li is also traversed with vue, but not the same app
li is app2
for (var j = 0; j < goods_box.length; jPP) {
goods_box[j].addEventListener("click",function(){
item.style = "left:0;z-index:999";
//ajax
var daya = "{name:"550ml",img:["image/1.jpg","image/2.jpg"],p_int:"",pri:"0.99",old_pri:"99",sell:"9999",kg:"550ml",pac:"",qgp:"730",storage:"",car_img:["image/1.jpg","image/2.jpg"]}"
var items_data = eval("("+ daya +")");
/ / app3.item_data = data;
/ / console.log (app3.item_data);
},false);