github.com/manicqin/nomad@v0.9.5/ui/app/components/freestyle/sg-multi-select-dropdown.js (about)

     1  import Component from '@ember/component';
     2  import { computed } from '@ember/object';
     3  
     4  export default Component.extend({
     5    options1: computed(() => [
     6      { key: 'option-1', label: 'Option One' },
     7      { key: 'option-2', label: 'Option Two' },
     8      { key: 'option-3', label: 'Option Three' },
     9      { key: 'option-4', label: 'Option Four' },
    10      { key: 'option-5', label: 'Option Five' },
    11    ]),
    12  
    13    selection1: computed(() => ['option-2', 'option-4', 'option-5']),
    14  
    15    optionsMany: computed(() =>
    16      Array(100)
    17        .fill(null)
    18        .map((_, i) => ({ label: `Option ${i}`, key: `option-${i}` }))
    19    ),
    20    selectionMany: computed(() => []),
    21  
    22    optionsDatacenter: computed(() => [
    23      { key: 'pdx-1', label: 'pdx-1' },
    24      { key: 'jfk-1', label: 'jfk-1' },
    25      { key: 'jfk-2', label: 'jfk-2' },
    26      { key: 'muc-1', label: 'muc-1' },
    27    ]),
    28    selectionDatacenter: computed(() => ['jfk-1', 'jfk-2']),
    29  
    30    optionsType: computed(() => [
    31      { key: 'batch', label: 'Batch' },
    32      { key: 'service', label: 'Service' },
    33      { key: 'system', label: 'System' },
    34      { key: 'periodic', label: 'Periodic' },
    35      { key: 'parameterized', label: 'Parameterized' },
    36    ]),
    37    selectionType: computed(() => ['system', 'service']),
    38  
    39    optionsStatus: computed(() => [
    40      { key: 'pending', label: 'Pending' },
    41      { key: 'running', label: 'Running' },
    42      { key: 'dead', label: 'Dead' },
    43    ]),
    44    selectionStatus: computed(() => []),
    45  });