|
@@ -1,22 +1,25 @@
|
|
<template lang="pug">
|
|
<template lang="pug">
|
|
.cart
|
|
.cart
|
|
- <cart-total />
|
|
|
|
- <cart-list />
|
|
|
|
- <cart-options />
|
|
|
|
|
|
+ cart-total
|
|
|
|
+ cart-list(data: "items")
|
|
|
|
+ cart-options
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import CartTotal from '@/components/CartTotal'
|
|
import CartTotal from '@/components/CartTotal'
|
|
import CartList from '@/components/CartList'
|
|
import CartList from '@/components/CartList'
|
|
import CartOptions from '@/components/CartOptions'
|
|
import CartOptions from '@/components/CartOptions'
|
|
|
|
+ import { mapGetters } from 'vuex'
|
|
|
|
|
|
export default {
|
|
export default {
|
|
components: {
|
|
components: {
|
|
'cart-total': CartTotal,
|
|
'cart-total': CartTotal,
|
|
'cart-list': CartList,
|
|
'cart-list': CartList,
|
|
'cart-options': CartOptions
|
|
'cart-options': CartOptions
|
|
- }
|
|
|
|
-
|
|
|
|
|
|
+ },
|
|
|
|
+ computed: mapGetters({
|
|
|
|
+ items: 'getCartItems'
|
|
|
|
+ })
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
|
|
|
|
@@ -24,7 +27,5 @@
|
|
.cart
|
|
.cart
|
|
width: 100%
|
|
width: 100%
|
|
height: 100%
|
|
height: 100%
|
|
- display: flex
|
|
|
|
- flex-direction: column
|
|
|
|
</style>
|
|
</style>
|
|
|
|
|