From f7816f0d0cd0bbc232fa5a5245732a57e0f5c0ff Mon Sep 17 00:00:00 2001 From: LinCyJang Date: Tue, 8 Jul 2025 23:26:16 +0800 Subject: [PATCH] =?UTF-8?q?Fix=EF=BC=9A3993=20=E3=80=90=E5=95=86=E5=9F=8E?= =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E3=80=91=E5=9C=A8=E5=A4=9A=E8=A7=84?= =?UTF-8?q?=E6=A0=BC=E5=95=86=E5=93=81=E5=85=A5=E5=8F=A3=E5=9B=BE=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E8=B4=AD=E7=89=A9=E8=BD=A6=E6=8C=89=E9=92=AE=EF=BC=8C?= =?UTF-8?q?=E4=BC=9A=E4=BF=9D=E7=95=99=E4=B8=8A=E4=B8=80=E4=B8=AA=E5=95=86?= =?UTF-8?q?=E5=93=81=E7=9A=84=E9=80=89=E6=8B=A9=E6=95=B0=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/ProductWindow.vue | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/components/ProductWindow.vue b/components/ProductWindow.vue index 0c7d53a..09825f5 100644 --- a/components/ProductWindow.vue +++ b/components/ProductWindow.vue @@ -130,12 +130,23 @@ export default { } }, watch: { + 'attr.cartAttr': { + handler(val) { + console.log(val); + if(!val) { + this.cartNumber = 1 + } + }, + deep: true, + immediate: true + }, cartNum: { handler(val) { console.log(val, 'cardNum'); this.cartNumber = val || 1 }, - deep: true + deep: true, + immediate: true }, cartNumber(val) { if (val > this.attrObj.productSelect.stock) {