0👍
- Your defined data does not contain
price
andquantity
new Vue({
el:'body',
data:{
message:'Hello world ',
price: 0,
quantity: 0
},
//...
}
- If you want value changes from the component’s props to sync to the parent instance’s data, you have to use the
.sync
modifier
<form >
<input_box label="quantity" name.sync="quantity" ></input_box>
<input_box label="price" name.sync="price" ></input_box>
{{totalprice}}
</form>
Source:stackexchange.com