Commit 3bd475ff772365eef684e4094e36d0af61cbedef
1 parent
88be308e
解决用户输入为0this.stepperValue未自动获取input的值问题
Showing
1 changed file
with
4 additions
and
0 deletions
src/pages/goodDetails/goodDetails.vue
| ... | ... | @@ -283,6 +283,10 @@ export default { |
| 283 | 283 | }, |
| 284 | 284 | // 跳转到确认订单详情 |
| 285 | 285 | jumpToConfirmOrderPage (item) { |
| 286 | + // 解决用户输入为0this.stepperValue未自动获取input的值问题 | |
| 287 | + if (this.stepperValue == 0) { | |
| 288 | + this.stepperValue = 1; | |
| 289 | + } | |
| 286 | 290 | if ((parseInt(this.goodsInfo.stock) > -1 && parseInt(this.stepperValue) > parseInt(this.goodsInfo.stock)) || parseInt(this.stepperValue) > 999) { |
| 287 | 291 | Toast("数量超出库存范围~") |
| 288 | 292 | } else { | ... | ... |