Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## Data ##
- data() {
- return {
- paints: this.$store.getters.allPaints,
- chunkedPaints: null
- }
- }
- ## stuff ##
- methods: {
- ...mapActions(['getAllPaints']),
- },
- async beforeCreated() {
- console.log('im here')
- },
- async mounted() {
- console.log('done')
- await this.getAllPaints()
- },
- computed: {
- chunkedItems() {
- return this._.chunk(this.paints, 4)
- }
- }
- ## template ##
- <b-row v-for="paints in this.chunkedPaints" :key="paints.index">
- <b-col v-for="paint in paints" :key="paint.id">
- <h1>{{ paint.name }}</h1>
- </b-col>
- </b-row>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement