例如:改变数量或者单价,金额会发生变化
var list=[{price:30,qty:2}];
var index=0;
var line=list[index];
line.money=line.qty*line.price;
解决方法
1.this.$set(list,index,line);//或者this.$set(line,'money',line.money);
3.Vue.set(list,index,line);
例如:改变数量或者单价,金额会发生变化
var list=[{price:30,qty:2}];
var index=0;
var line=list[index];
line.money=line.qty*line.price;
解决方法
1.this.$set(list,index,line);//或者this.$set(line,'money',line.money);
3.Vue.set(list,index,line);