SHARE
TWEET

why_no_work

a guest Feb 16th, 2020 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ## Data ##
  2.  
  3.   data() {
  4.     return {
  5.       paints: this.$store.getters.allPaints,
  6.       chunkedPaints: null
  7.     }
  8.   }
  9.  
  10. ## stuff ##
  11.  
  12.   methods: {
  13.     ...mapActions(['getAllPaints']),
  14.   },
  15.   async beforeCreated() {
  16.     console.log('im here')
  17.   },
  18.   async mounted() {
  19.     console.log('done')
  20.     await this.getAllPaints()
  21.   },
  22.   computed: {
  23.     chunkedItems() {
  24.       return this._.chunk(this.paints, 4)
  25.     }
  26.   }
  27.  
  28. ## template ##
  29.  
  30.   <b-row v-for="paints in this.chunkedPaints" :key="paints.index">
  31.       <b-col v-for="paint in paints" :key="paint.id">
  32.         <h1>{{ paint.name }}</h1>
  33.       </b-col>
  34.     </b-row>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top