File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 1
1
<template >
2
2
<div class =" cart" >
3
3
<h2 >Your Cart</h2 >
4
- <p v-show =" !products.length" ><i >Please add some products to cart.</i ></p >
4
+ <p v-show =" !products.length" >
5
+ <i >Please add some products to cart.</i >
6
+ </p >
5
7
<ul >
6
- <li
7
- v-for =" product in products"
8
- :key =" product.id" >
8
+ <li v-for =" product in products" :key =" product.id" >
9
9
{{ product.title }} - {{ product.price | currency }} x {{ product.quantity }}
10
10
</li >
11
11
</ul >
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ const getters = {
13
13
return state . items . map ( ( { id, quantity } ) => {
14
14
const product = rootState . products . all . find ( product => product . id === id )
15
15
return {
16
+ id : product . id ,
16
17
title : product . title ,
17
18
price : product . price ,
18
19
quantity
You can’t perform that action at this time.
0 commit comments