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

49 lines
844 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">
2021-06-01 22:46:15 +02:00
<span>{{ $t('default.Loading…') }}</span>
2019-10-05 20:01:06 +02:00
</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>