element-plus/docs/examples/select/clearable.vue
kooriookami 5844947198
refactor(components): [select & select-v2] Refactor components (#15352)
* 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
2024-01-10 11:14:58 +08:00

44 lines
637 B
Vue

<template>
<el-select
v-model="value"
clearable
placeholder="Select"
style="width: 240px"
>
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</template>
<script lang="ts" setup>
import { ref } from 'vue'
const value = ref('')
const options = [
{
value: 'Option1',
label: 'Option1',
},
{
value: 'Option2',
label: 'Option2',
},
{
value: 'Option3',
label: 'Option3',
},
{
value: 'Option4',
label: 'Option4',
},
{
value: 'Option5',
label: 'Option5',
},
]
</script>