The data in vue is two-way bound.
But I don’t want to bind, I just want to assign the value to vue, but the original attributes remain unchanged, that is, one-way assignment?
var v = new Vue({el: "#a",data:{ a: ''}
})
开始 a = '';
var b = 2;
v.a = b;
v.a = 3; // 这里b也等于3了
我想
v.a =3; // 但是b还是等于2
What method is used to assign values?
Two-way binding only works in templates
b will not also be equal to 3
Put the code on codepen and reproduce it?