[Vuejs]-Vue.js Select All Options

0👍

You data property must be a function not an object.
try this:

data(){
    return {
        selected: ['A', 'B', 'C'],
        options: [
            { text: 'One', value: 'A' },
            { text: 'Two', value: 'B' },
            { text: 'Three', value: 'C' },
            { text: 'Any', value: ['A', 'B', 'C'] },
       ]
    }
  }

Also see the docs that you must have the data as a function in almost all cases.

Leave a comment