From 97f8e328ca1e3a8093e89879ac702e3020a44f27 Mon Sep 17 00:00:00 2001 From: fantasticbin Date: Mon, 20 Jun 2022 18:28:23 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=95=86=E5=93=81=E6=94=BE?= =?UTF-8?q?=E5=85=A5=E8=B4=AD=E7=89=A9=E8=BD=A6=E7=9A=84=E6=95=B0=E9=87=8F?= =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E6=96=B9=E5=BC=8F=EF=BC=8C=E9=80=9A=E8=BF=87?= =?UTF-8?q?data=E4=B8=8Ewatch=E7=9B=91=E5=90=AC=E6=9D=A5=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ProductList.vue | 55 +++++++++++++++++++++++----------- src/store/modules/cart.js | 22 +++++--------- src/store/modules/products.js | 9 ++---- 3 files changed, 49 insertions(+), 37 deletions(-) diff --git a/src/components/ProductList.vue b/src/components/ProductList.vue index f6a4c1b..1615235 100644 --- a/src/components/ProductList.vue +++ b/src/components/ProductList.vue @@ -5,11 +5,11 @@ :key="product.id"> {{ product.title }} - {{ product.price }} x {{ product.inventory }}
- + + @click="addProductToCart(product)"> 加入购物车 @@ -17,30 +17,51 @@