mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-02 11:17:46 +08:00
5844947198
* refactor(components): [select&select-v2] refactor components * refactor(components): [select-v2] * refactor(components): update * refactor(components): update * refactor(components): [select-v2] update * refactor(components): update * refactor(components): update * refactor(components): update type * refactor(components): update * refactor(components): update * refactor(components): update style * refactor(components): update docs * refactor(components): update * refactor(components): fix #15323 * refactor(theme-chalk): update * refactor(components): update * refactor(components): update * refactor(components): update * refactor(components): fix bugs * fix(components): fix issue * fix(components): update * fix(components): fix some bug * feat(components): update * feat(components): add tag slot * feat(components): update * fix(components): update * style(theme-chalk): update style * fix(theme-chalk): update * feat(theme-chalk): update * fix(components): update * feat: update * feat: update * feat: update * feat(components): update
59 lines
1.0 KiB
Vue
59 lines
1.0 KiB
Vue
<template>
|
|
<el-select v-model="value" placeholder="Select" style="width: 240px">
|
|
<el-option-group
|
|
v-for="group in options"
|
|
: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-group>
|
|
</el-select>
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
import { ref } from 'vue'
|
|
|
|
const value = ref('')
|
|
const options = [
|
|
{
|
|
label: 'Popular cities',
|
|
options: [
|
|
{
|
|
value: 'Shanghai',
|
|
label: 'Shanghai',
|
|
},
|
|
{
|
|
value: 'Beijing',
|
|
label: 'Beijing',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
label: 'City name',
|
|
options: [
|
|
{
|
|
value: 'Chengdu',
|
|
label: 'Chengdu',
|
|
},
|
|
{
|
|
value: 'Shenzhen',
|
|
label: 'Shenzhen',
|
|
},
|
|
{
|
|
value: 'Guangzhou',
|
|
label: 'Guangzhou',
|
|
},
|
|
{
|
|
value: 'Dalian',
|
|
label: 'Dalian',
|
|
},
|
|
],
|
|
},
|
|
]
|
|
</script>
|