fix the total
This commit is contained in:
parent
df8208dc0f
commit
d24dbab797
|
@ -1,8 +1,15 @@
|
|||
export default {
|
||||
finalTotal(state) {
|
||||
return state.total.toFixed(2);
|
||||
},
|
||||
quantity(state) {
|
||||
return state.qty;
|
||||
},
|
||||
items(state) {
|
||||
return state.items;
|
||||
},
|
||||
total(state) {
|
||||
var total = 0;
|
||||
state.items.forEach(item => {
|
||||
total = total + item.price;
|
||||
});
|
||||
return total.toFixed(2);
|
||||
}
|
||||
};
|
||||
|
|
Reference in New Issue