|
@@ -1,7 +1,7 @@
|
|
|
<template lang="pug">
|
|
|
li.cart-item
|
|
|
h3.item-name {{ item.display_name }}
|
|
|
- input.item-quantity(:value="item.qty" number)
|
|
|
+ input.item-quantity(:value="quantity" v-model="quantity" number)
|
|
|
span.item-x x
|
|
|
span.item-price {{ formatPrice() }}
|
|
|
span.item-equals =
|
|
@@ -28,9 +28,21 @@
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- computed: mapGetters([
|
|
|
- 'currencySymbol'
|
|
|
- ]),
|
|
|
+ computed: {
|
|
|
+ quantity: {
|
|
|
+ get() {
|
|
|
+ return this.item.qty || 1
|
|
|
+ },
|
|
|
+ set(value) {
|
|
|
+ console.log(value)
|
|
|
+
|
|
|
+ this.item.qty = value || 1
|
|
|
+ }
|
|
|
+ },
|
|
|
+ ...mapGetters([
|
|
|
+ 'currencySymbol'
|
|
|
+ ])
|
|
|
+ },
|
|
|
methods: {
|
|
|
add(item) {
|
|
|
this.addToCart(item)
|