This repository has been archived on 2021-09-06. You can view files and clone it, but cannot push or open issues or pull requests.
vuejs_course/2021-05-05_vuex-11-a-challe.../src/pages/ProductsList.vue

38 lines
659 B
Vue

<template>
<section>
<ul>
<product-item
v-for="prod in products"
:key="prod.id"
:id="prod.id"
:title="prod.title"
:image="prod.image"
:description="prod.description"
:price="prod.price"
></product-item>
</ul>
</section>
</template>
<script>
import ProductItem from '../components/products/ProductItem.vue';
import { mapGetters } from 'vuex';
export default {
computed: {
...mapGetters('products', ['products'])
},
components: {
ProductItem
}
};
</script>
<style scoped>
ul {
list-style: none;
margin: 2rem auto;
padding: 0;
max-width: 40rem;
}
</style>