Issue #1571 fixed
This commit is contained in:
parent
310f426272
commit
195330c192
|
|
@ -1933,15 +1933,22 @@ section.product-detail {
|
|||
float: right;
|
||||
|
||||
.control-group {
|
||||
display: inline-block;
|
||||
max-width: 50px;
|
||||
max-width: initial;
|
||||
width: auto;
|
||||
text-align: center;
|
||||
margin-bottom: 0;
|
||||
border-top: 0;
|
||||
padding-top: 0;
|
||||
|
||||
label {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.control {
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
height: 38px;
|
||||
width: 60px;
|
||||
text-align: center;
|
||||
line-height: 38px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -176,6 +176,11 @@
|
|||
default: 1
|
||||
},
|
||||
|
||||
minQuantity: {
|
||||
type: [Number, String],
|
||||
default: 1
|
||||
},
|
||||
|
||||
validations: {
|
||||
type: String,
|
||||
default: 'required|numeric|min_value:1'
|
||||
|
|
@ -198,7 +203,7 @@
|
|||
|
||||
methods: {
|
||||
decreaseQty: function() {
|
||||
if (this.qty > 1)
|
||||
if (this.qty > this.minQuantity)
|
||||
this.qty = parseInt(this.qty) - 1;
|
||||
|
||||
this.$emit('onQtyUpdated', this.qty)
|
||||
|
|
|
|||
|
|
@ -16,10 +16,14 @@
|
|||
|
||||
@include ('shop::products.price', ['product' => $groupedProduct->associated_product])
|
||||
</span>
|
||||
|
||||
<span class="qty">
|
||||
<div class="control-group">
|
||||
<input name="qty[{{$groupedProduct->associated_product_id}}]" class="control" value="{{ $groupedProduct->qty }}"/>
|
||||
</div>
|
||||
<quantity-changer
|
||||
:control-name="'qty[{{$groupedProduct->associated_product_id}}]'"
|
||||
:validations="'required|numeric|min_value:0'"
|
||||
quantity="{{ $groupedProduct->qty }}"
|
||||
min-quantity="0">
|
||||
</quantity-changer>
|
||||
</span>
|
||||
</li>
|
||||
@endforeach
|
||||
|
|
|
|||
Loading…
Reference in New Issue