diff options
Diffstat (limited to 'iridescence/src/components/ProductList.vue')
-rw-r--r-- | iridescence/src/components/ProductList.vue | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/iridescence/src/components/ProductList.vue b/iridescence/src/components/ProductList.vue new file mode 100644 index 0000000..537e802 --- /dev/null +++ b/iridescence/src/components/ProductList.vue @@ -0,0 +1,36 @@ +<template> + <div id="productsList"> + <div class="columns is-multiline is-variable is-7-desktop"> + <div + class="column is-one-quarter" + v-for="item in products" + :key="item.id" + > + <ProductCard v-bind="item"></ProductCard> + </div> + </div> + </div> +</template> + +<script> +import ProductCard from "@/components/ProductCard.vue"; + +export default { + name: "ProductsList", + components: { + ProductCard + }, + data() { + return {}; + }, + computed: { + products() { + return this.$store.getters.products; + } + }, + methods: {}, + created() { + this.$store.dispatch("refreshProducts"); + } +}; +</script> |