fix(Sku): stepper emit valid num (#5210)

This commit is contained in:
Waiter 2019-12-06 16:57:05 +08:00 committed by neverland
parent c45a08fead
commit 47c3d61584

View File

@ -42,7 +42,9 @@ export default createComponent({
watch: {
currentNum(num) {
const intValue = parseInt(num, 10);
this.skuEventBus.$emit('sku:numChange', intValue);
if (intValue >= this.stepperMinLimit && intValue <= this.stepperLimit) {
this.skuEventBus.$emit('sku:numChange', intValue);
}
},
stepperLimit(limit) {