Fix:3343 【礼品】购买礼品数量,增加可以手动输入数字
This commit is contained in:
@@ -276,7 +276,11 @@ export default {
|
||||
let stock = productSelect.stock || 0
|
||||
let num = this.attr.productSelect
|
||||
if (changeValue) {
|
||||
num.cart_num++
|
||||
if(changeValue > 1) {
|
||||
num.cart_num = changeValue
|
||||
} else {
|
||||
num.cart_num++
|
||||
}
|
||||
if (num.cart_num > stock) {
|
||||
if(stock < 1) {
|
||||
this.$set(this.attr.productSelect, 'cart_num', 1)
|
||||
@@ -291,7 +295,7 @@ export default {
|
||||
this.$set(this, 'cart_num', 1)
|
||||
} else {
|
||||
this.$set(this.attr.productSelect, 'cart_num', num.cart_num)
|
||||
this.$set(this, 'cart_num', num.cart_num)
|
||||
// this.$set(this, 'cart_num', num.cart_num)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user