Merge branch 'master' into frontend-breadcrumb
This commit is contained in:
commit
296290b416
|
|
@ -158,7 +158,14 @@
|
|||
<span class="quantity-container">
|
||||
<button type="button" class="decrease" @click="decreaseQty()">-</button>
|
||||
|
||||
<input :name="controlName" class="control" :value="qty" :v-validate="validations" data-vv-as=""{{ __('shop::app.products.quantity') }}"" readonly>
|
||||
<input
|
||||
ref="quantityChanger"
|
||||
:name="controlName"
|
||||
:model="qty"
|
||||
class="control"
|
||||
v-validate="validations"
|
||||
data-vv-as=""{{ __('shop::app.products.quantity') }}""
|
||||
@keyup="setQty($event)">
|
||||
|
||||
<button type="button" class="increase" @click="increaseQty()">+</button>
|
||||
|
||||
|
|
@ -236,26 +243,30 @@
|
|||
}
|
||||
},
|
||||
|
||||
watch: {
|
||||
quantity: function (val) {
|
||||
this.qty = val;
|
||||
mounted: function() {
|
||||
this.$refs.quantityChanger.value = this.minQuantity;
|
||||
},
|
||||
|
||||
this.$emit('onQtyUpdated', this.qty)
|
||||
watch: {
|
||||
qty: function (val) {
|
||||
this.$refs.quantityChanger.value = val;
|
||||
|
||||
this.$emit('onQtyUpdated', this.qty);
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
setQty: function({ target }) {
|
||||
this.qty = parseInt(target.value);
|
||||
},
|
||||
|
||||
decreaseQty: function() {
|
||||
if (this.qty > this.minQuantity)
|
||||
this.qty = parseInt(this.qty) - 1;
|
||||
|
||||
this.$emit('onQtyUpdated', this.qty)
|
||||
},
|
||||
|
||||
increaseQty: function() {
|
||||
this.qty = parseInt(this.qty) + 1;
|
||||
|
||||
this.$emit('onQtyUpdated', this.qty)
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"/js/velocity.js": "/js/velocity.js?id=5b0e7e5d2810ad90cde3",
|
||||
"/js/velocity-core.js": "/js/velocity-core.js?id=5c0fe2bf195ee94576fd",
|
||||
"/css/velocity-admin.css": "/css/velocity-admin.css?id=4322502d80a0e4a0affd",
|
||||
"/css/velocity.css": "/css/velocity.css?id=36b2545fdcbd0d9d02e1"
|
||||
}
|
||||
|
|
@ -15,13 +15,14 @@
|
|||
<button type="button" class="decrease" @click="decreaseQty()">-</button>
|
||||
|
||||
<input
|
||||
:value="qty"
|
||||
class="control"
|
||||
ref="quantityChanger"
|
||||
:name="controlName"
|
||||
:v-validate="validations"
|
||||
:model="qty"
|
||||
class="control"
|
||||
id="quantity-changer"
|
||||
v-validate="validations"
|
||||
:data-vv-as="`"${quantityText}"`"
|
||||
readonly
|
||||
@keyup="setQty($event)"
|
||||
/>
|
||||
|
||||
<button type="button" class="increase" @click="increaseQty()">+</button>
|
||||
|
|
@ -71,25 +72,29 @@ export default {
|
|||
};
|
||||
},
|
||||
|
||||
mounted: function() {
|
||||
this.$refs.quantityChanger.value = this.minQuantity;
|
||||
},
|
||||
|
||||
watch: {
|
||||
quantity: function(val) {
|
||||
this.qty = val;
|
||||
qty: function(val) {
|
||||
this.$refs.quantityChanger.value = val;
|
||||
|
||||
this.$emit('onQtyUpdated', this.qty);
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
setQty: function({ target }) {
|
||||
this.qty = parseInt(target.value);
|
||||
},
|
||||
|
||||
decreaseQty: function() {
|
||||
if (this.qty > this.minQuantity) this.qty = parseInt(this.qty) - 1;
|
||||
|
||||
this.$emit('onQtyUpdated', this.qty);
|
||||
},
|
||||
|
||||
increaseQty: function() {
|
||||
this.qty = parseInt(this.qty) + 1;
|
||||
|
||||
this.$emit('onQtyUpdated', this.qty);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1099,4 +1099,18 @@ i.within-circle {
|
|||
width: 97px;
|
||||
-webkit-appearance: none
|
||||
}
|
||||
|
||||
.nav-container {
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
width: 75%;
|
||||
position: fixed !important;
|
||||
opacity: 1;
|
||||
z-index: 9999;
|
||||
height: 100vh;
|
||||
font-size: 16px;
|
||||
overflow-y: scroll;
|
||||
box-shadow: 5px 0 5px -5px #333;
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue