Q:

Vuejs disabled selected dropdown options?

I have an array selected which holds a set of selected options. I'd like to use that array to add a disabled attribute on those options.
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title> Vue-js Control </title>
    </head>
    <body>
        <div id="demo">
            <select v-model="selected" multiple>
              <option v-for="option in options" v-bind:value="option.value">
                {{ option.text }}
              </option>
            </select>
            <span>Selected: {{ selected }}</span>
        </div>

    <script type="text/javascript" src='http://cdnjs.cloudflare.com/ajax/libs/vue/1.0.16/vue.min.js'></script>
    <script type="text/javascript">
    new Vue({
        el: '#demo',
        data: {
            selected: ['A','B','D'],
            options: [
              { text: 'One', value: 'A' },
              { text: 'Two', value: 'B' },
              { text: 'Three', value: 'C' },
              { text: 'Four', value: 'D' },
              { text: 'Five', value: 'E' },
              { text: 'Six', value: 'F' },
              { text: 'Seven', value: 'G' },
            ]
        }
    });
    </script>
</body>

A:

You want to disable all options that are in the selected array?
<option v-for="option in options" :disabled="selected.includes(option.value)" :value="option.value">

