[Vuejs]-Vue test watcher change but code inside not response

0๐Ÿ‘

You need to set deep to true when watching an array or object so that
Vue knows that it should watch the nested data for changes.

watch: {
 getSkills: {
  handler () {
   this.list = this.getSkills.map(items => {
    return { value: items.id, label: items.name }
   })
  },
  deep: true
 }
}

Leave a comment