Fix:3416 【礼品功能】送礼页面手动删除数量后,该数量框显示空白,删除数量后,默认为1

This commit is contained in:
modendeveloper
2025-04-01 12:55:36 +08:00
parent 3bbd796a85
commit 68cfae2893
2 changed files with 17 additions and 13 deletions
+9 -1
View File
@@ -54,7 +54,6 @@
<text class="v12-primary-text v12-font-bold v12-font-30">{{ payPrice }}</text>
</view>
<view>
<u-number-box
v-if="!isPayOk"
v-model="goodsInfo.cartNum"
@@ -63,6 +62,7 @@
iconStyle="color: #fff"
class="num-step"
@change="numberChange"
@blur="numberBlur(goodsInfo.cartNum)"
>
<template v-slot:minus>
@@ -230,6 +230,14 @@ export default {
numberChange(e) {
this.computedPrice(e.value)
},
numberBlur(e) {
console.log(e);
this.isPayOk = true
setTimeout(() => {
this.isPayOk = false
},10)
this.$forceUpdate()
},
computedPrice(num) {
const params = {
cartId: this.cartId,