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

49 lines
836 B
Vue
Raw Normal View History

<template>
<div id="showrooms">
<div class="loading" v-if="!items.length">
2021-06-01 22:46:15 +02:00
<span>{{ $t('default.Loading…') }}</span>
</div>
<Showroom
v-else
v-for="item in items"
v-bind:key="item.uuid"
:item="item"
/>
</div>
</template>
<script>
import Showroom from 'vuejs/components/Content/Showroom'
import { mapState, mapActions } from 'vuex'
export default {
2021-08-05 12:22:57 +02:00
name: 'Showrooms',
// data() {
// return {
// items:[],
// page:0
// }
// },
computed: {
...mapState({
items: state => state.Showrooms.items
})
},
created(){
if(!this.items.length)
2022-09-19 15:58:11 +02:00
this.getShowrooms()
},
methods: {
...mapActions({
2022-09-19 15:58:11 +02:00
getShowrooms: 'Showrooms/getShowrooms'
})
},
components: {
Showroom
}
}
</script>
<style lang="scss" scoped>
</style>