Select

TIP

It`s slightly modified button from It's only style change. Full list of features, see the documentation

Basic usage

<template>
    <div class="dropdowns_start">
        <el-select v-model="Select" placeholder="Select element">
               <el-option v-for="item in options" :key="item.key" :label="item.label" :value="item.value">
               </el-option>
        </el-select>
        <p class="result left">
            result: <span> {{ Select }} </span>
        </p>
    </div>
</template>

<script>
    export default {
        data() {
            return {
                options: [{
                    key: 1,
                    value: 'v-Item 1',
                    label: 'Item 1'
                }, {
                    key: 2,
                    value: 'v-Item 2',
                    label: 'Item 2'
                }, {
                    key: 3,
                    value: 'v-Item 3',
                    label: 'Item 3'
                }, {
                    key: 4,
                    value: 'v-Item 4',
                    label: 'Item 4'
                },],
                Select: ''
            }
        }
    };
</script>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38

Default select usage

<template>
    <div class="dropdowns_start">
        <el-select v-model="Select" placeholder="Select element">
               <el-option v-for="item in options" :key="item.key" :label="item.label" :value="item.value">
               </el-option>
        </el-select>
        <p class="result left">
            result: <span> {{ Select }} </span>
        </p>
    </div>
</template>

<script>
    export default {
        data() {
            return {
                options: [{
                    key: 1,
                    value: 'v-Item 1',
                    label: 'Item 1'
                }, {
                    key: 2,
                    value: 'v-Item 2',
                    label: 'Item 2'
                }, {
                    key: 3,
                    value: 'v-Item 3',
                    label: 'Item 3'
                }, {
                    key: 4,
                    value: 'v-Item 4',
                    label: 'Item 4'
                },],
                Select: 'v-Item 2'
            }
        }
    };
</script>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38

Grouping usage

<template>
    <div class="dropdowns_start">
        <el-select v-model="Select" placeholder="Select element">
               <el-option-group v-for="group in optionsGroup" :key="group.label" :label="group.label">
                     <el-option v-for="item in group.options" :key="item.value" :label="item.label" :value="item.value">
                     </el-option>
                   </el-option-group>
        </el-select>
        <p class="result left">
            result: <span> {{ Select }} </span>
        </p>
    </div>
</template>

<script>
    export default {
        data() {
            return {
                optionsGroup: [{
                    label: 'Popular',
                    options: [{
                            key: 2,
                            value: 'v-Item 11',
                            label: 'Item 11'
                        }, {
                            key: 4,
                            value: 'v-Item 22',
                            label: 'Item 22'
                        },],
                    }, {
                    label: 'All',
                    options: [{
                            key: 1,
                            value: 'v-Item 10',
                            label: 'Item 10'
                        }, {
                            key: 2,
                            value: 'v-Item 11',
                            label: 'Item 11'
                        }, {
                            key: 3,
                            value: 'v-Item 12',
                            label: 'Item 12'
                        }, {
                            key: 4,
                            value: 'v-Item 22',
                            label: 'Item 22'
                        },],
                    }],

                options: [{
                    key: 1,
                    value: 'v-Item 10',
                    label: 'Item 10'
                }, {
                    key: 2,
                    value: 'v-Item 11',
                    label: 'Item 11'
                }, {
                    key: 3,
                    value: 'v-Item 12',
                    label: 'Item 12'
                }, {
                    key: 4,
                    value: 'v-Item 22',
                    label: 'Item 22'
                },],
                Select: ''
            }
        }
    };
</script>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72

Filter usage

<template>
    <div class="dropdowns_start">
        <el-select v-model="Select" filterable="" no-match-text="Nothing found on your request" placeholder="Select element">
               <el-option v-for="item in options" :key="item.key" :label="item.label" :value="item.value">
               </el-option>
        </el-select>
        <p class="result left">
            result: <span> {{ Select }} </span>
        </p>
    </div>
</template>

<script>
    export default {
        data() {
            return {
                options: [{
                    key: 1,
                    value: 'v-Item 10',
                    label: 'Item 10'
                }, {
                    key: 2,
                    value: 'v-Item 11',
                    label: 'Item 11'
                }, {
                    key: 3,
                    value: 'v-Item 12',
                    label: 'Item 12'
                }, {
                    key: 4,
                    value: 'v-Item 22',
                    label: 'Item 22'
                },],
                Select: ''
            }
        }
    };
</script>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38

Multiple usage

<template>
    <div class="dropdowns_start">
        <el-select v-model="Select" multiple="" collapse-tags="" placeholder="Select element">
               <el-option v-for="item in options" :key="item.key" :label="item.label" :value="item.value">
               </el-option>
        </el-select>
        <p class="result left">
            result: <span> {{ Select }} </span>
        </p>
    </div>
</template>

<script>
    export default {
        data() {
            return {
                options: [{
                    key: 1,
                    value: 'v-Item 10',
                    label: 'Item 10'
                }, {
                    key: 2,
                    value: 'v-Item 11',
                    label: 'Item 11'
                }, {
                    key: 3,
                    value: 'v-Item 12',
                    label: 'Item 12'
                }, {
                    key: 4,
                    value: 'v-Item 22',
                    label: 'Item 22'
                },],
                Select: ''
            }
        }
    };
</script>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38

Multiple and filter usage

<template>
    <div class="dropdowns_start">
        <el-select v-model="Select" filterable="" multiple="" collapse-tags="" no-match-text="Nothing found on your request" placeholder="Select element">
               <el-option v-for="item in options" :key="item.key" :label="item.label" :value="item.value">
               </el-option>
        </el-select>
        <p class="result left">
            result: <span> {{ Select }} </span>
        </p>
    </div>
</template>

<script>
    export default {
        data() {
            return {
                options: [{
                    key: 1,
                    value: 'v-Item 10',
                    label: 'Item 10'
                }, {
                    key: 2,
                    value: 'v-Item 11',
                    label: 'Item 11'
                }, {
                    key: 3,
                    value: 'v-Item 12',
                    label: 'Item 12'
                }, {
                    key: 4,
                    value: 'v-Item 22',
                    label: 'Item 22'
                },],
                Select: ''
            }
        }
    };
</script>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38