< div id= "app" >
<input v-model="c.a">
<input v-model="c.b">
<input :value="c.a*c.b">
< / div >
var vm = new Vue ({
el:"-sharpapp",
data:{
c:{}
},
...
});
because the official document says that the form with v-model ignores the value attribute, how should I implement it if I want to get the values of three input boxes and submit them to the background as the same object c (it can be obtained directly in angularjs, is there a similar way to MVVM"s Vuejs)?
has tried to bind to the third box in data and set the calculation rules (multiplication), but it seems that Vue does not recognize
< input vMube model = "c.d" >
.
data: {
c:{
//d:this.c.a*this.c.b
}
},
.
ask for advice!