mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-15 09:50:58 +08:00
bbed5a5e96
* fix(components): [select-v2] missing validate action when clear - Fix the bug that missing validate when clear - Add the same icon and style as the select component * docs: [select-v2] fix demo render error
29 lines
662 B
Vue
29 lines
662 B
Vue
<template>
|
|
<el-select-v2
|
|
v-model="value"
|
|
filterable
|
|
:options="options"
|
|
placeholder="Please select"
|
|
style="width: 240px"
|
|
multiple
|
|
/>
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
import { ref } from 'vue'
|
|
const initials = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j']
|
|
|
|
const value = ref([])
|
|
const options = Array.from({ length: 10 }).map((_, idx) => {
|
|
const label = idx + 1
|
|
return {
|
|
value: `Group ${label}`,
|
|
label: `Group ${label}`,
|
|
options: Array.from({ length: 10 }).map((_, idx) => ({
|
|
value: `Option ${idx + 1 + 10 * label}`,
|
|
label: `${initials[idx % 10]}${idx + 1 + 10 * label}`,
|
|
})),
|
|
}
|
|
})
|
|
</script>
|