49 lines
836 B
Vue
49 lines
836 B
Vue
<template>
|
|
<div id="showrooms">
|
|
<div class="loading" v-if="!items.length">
|
|
<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 {
|
|
name: 'Showrooms',
|
|
// data() {
|
|
// return {
|
|
// items:[],
|
|
// page:0
|
|
// }
|
|
// },
|
|
computed: {
|
|
...mapState({
|
|
items: state => state.Showrooms.items
|
|
})
|
|
},
|
|
created(){
|
|
if(!this.items.length)
|
|
this.getShowrooms()
|
|
},
|
|
methods: {
|
|
...mapActions({
|
|
getShowrooms: 'Showrooms/getShowrooms'
|
|
})
|
|
},
|
|
components: {
|
|
Showroom
|
|
}
|
|
}
|
|
</script>
|
|
<style lang="scss" scoped>
|
|
</style>
|