diff --git a/examples/shopping-cart/components/Cart.vue b/examples/shopping-cart/components/Cart.vue
index a5808ace0..b2025757c 100644
--- a/examples/shopping-cart/components/Cart.vue
+++ b/examples/shopping-cart/components/Cart.vue
@@ -3,8 +3,8 @@
Your Cart
Please add some products to cart.
- -
- {{ p.title }} - {{ p.price | currency }} x {{ p.quantity }}
+
-
+ {{ product.title }} - {{ product.price | currency }} x {{ product.quantity }}
Total: {{ total | currency }}
@@ -23,8 +23,8 @@ export default {
checkoutStatus: 'checkoutStatus'
}),
total () {
- return this.products.reduce((total, p) => {
- return total + p.price * p.quantity
+ return this.products.reduce((total, product) => {
+ return total + product.price * product.quantity
}, 0)
}
},
diff --git a/examples/shopping-cart/components/ProductList.vue b/examples/shopping-cart/components/ProductList.vue
index a3b1a67ef..288ed3d82 100644
--- a/examples/shopping-cart/components/ProductList.vue
+++ b/examples/shopping-cart/components/ProductList.vue
@@ -1,11 +1,11 @@
- -
- {{ p.title }} - {{ p.price | currency }}
+
-
+ {{ product.title }} - {{ product.price | currency }}
diff --git a/examples/shopping-cart/store/getters.js b/examples/shopping-cart/store/getters.js
index eb2c092d0..e0f4bbb32 100644
--- a/examples/shopping-cart/store/getters.js
+++ b/examples/shopping-cart/store/getters.js
@@ -1,6 +1,6 @@
export const cartProducts = state => {
return state.cart.added.map(({ id, quantity }) => {
- const product = state.products.all.find(p => p.id === id)
+ const product = state.products.all.find(product => product.id === id)
return {
title: product.title,
price: product.price,
diff --git a/examples/shopping-cart/store/modules/cart.js b/examples/shopping-cart/store/modules/cart.js
index 3e14eedda..1f324aee8 100644
--- a/examples/shopping-cart/store/modules/cart.js
+++ b/examples/shopping-cart/store/modules/cart.js
@@ -30,7 +30,7 @@ const actions = {
const mutations = {
[types.ADD_TO_CART] (state, { id }) {
state.checkoutStatus = null
- const record = state.added.find(p => p.id === id)
+ const record = state.added.find(product => product.id === id)
if (!record) {
state.added.push({
id,
diff --git a/examples/shopping-cart/store/modules/products.js b/examples/shopping-cart/store/modules/products.js
index 18c712d45..ec69788d1 100644
--- a/examples/shopping-cart/store/modules/products.js
+++ b/examples/shopping-cart/store/modules/products.js
@@ -27,7 +27,7 @@ const mutations = {
},
[types.ADD_TO_CART] (state, { id }) {
- state.all.find(p => p.id === id).inventory--
+ state.all.find(product => product.id === id).inventory--
}
}