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 @@