[Vuejs]-Vuejs: pass in an array of hashes to prop

0👍

You should change the arrow function data: () => { to data() {

According to the documentation:

Note that you should not use an arrow function with the data property (e.g. data: () => { return { a: this.myProp }}). The reason is arrow functions bind the parent context, so this will not be the Vue instance as you expect and this.myProp will be undefined.

Leave a comment