materio-d9/web/themes/custom/materiotheme/vuejs/components/Pages/Pricing.vue

49 lines
825 B
Vue
Raw Normal View History

2019-10-05 20:01:06 +02:00
<template>
<div id="pricing">
<div class="loading" v-if="!products.length">
2019-10-05 20:01:06 +02:00
<span>Loading ...</span>
</div>
<Product
v-else
v-for="product in products"
2019-10-05 20:01:06 +02:00
v-bind:key="product.uuid"
:product="product"
/>
</div>
</template>
<script>
import Product from 'vuejs/components/Content/Product'
import { mapState, mapActions } from 'vuex'
export default {
name: "Pricing",
// data() {
// return {
// items:[],
// page:0
// }
// },
computed: {
...mapState({
products: state => state.Pages.products
2019-10-05 20:01:06 +02:00
})
},
created(){
if(!this.products.length)
this.getProducts()
2019-10-05 20:01:06 +02:00
},
methods: {
...mapActions({
getProducts: 'Pages/getProducts'
2019-10-05 20:01:06 +02:00
})
},
components: {
Product
}
}
</script>
<style lang="scss" scoped>
</style>