mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-10-29 14:01:07 +00:00
improve: 购买数量填写限制
This commit is contained in:
parent
04cf5d4df4
commit
e00166ca3e
@ -151,7 +151,7 @@
|
||||
*
|
||||
*/
|
||||
bindCode: function(e) {
|
||||
this.$emit('iptCartNum', this.attr.productSelect.cart_num);
|
||||
this.$emit('iptCartNum', e);
|
||||
},
|
||||
closeAttr: function() {
|
||||
this.$emit('myevent');
|
||||
|
||||
@ -806,7 +806,15 @@
|
||||
*
|
||||
*/
|
||||
iptCartNum: function(e) {
|
||||
this.$set(this.attr.productSelect, "cart_num", e);
|
||||
if (e) {
|
||||
let number = 1
|
||||
if (Number.isInteger(parseInt(e)) && parseInt(e) > 0) {
|
||||
number = parseInt(e);
|
||||
}
|
||||
this.$nextTick(e => {
|
||||
this.$set(this.attr.productSelect, "cart_num", e < 0 ? 1 : number);
|
||||
})
|
||||
}
|
||||
},
|
||||
// 后退
|
||||
returns() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user