mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-04 04:08:34 +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
30 lines
619 B
Vue
30 lines
619 B
Vue
<template>
|
|
<el-select-v2
|
|
v-model="value"
|
|
:options="options"
|
|
placeholder="Please select"
|
|
value-key="name"
|
|
style="width: 240px"
|
|
/>
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
import { ref } from 'vue'
|
|
const initials = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j']
|
|
|
|
const value = ref({ name: 'Option 1', test: 'test 0' })
|
|
const options = Array.from({ length: 1000 }).map((_, idx) => ({
|
|
value: {
|
|
name: `Option ${idx + 1}`,
|
|
test: `test ${idx % 3}`,
|
|
},
|
|
label: `${initials[idx % 10]}${idx}`,
|
|
}))
|
|
</script>
|
|
|
|
<style scoped>
|
|
.example-showcase .el-select-v2 {
|
|
margin-right: 20px;
|
|
}
|
|
</style>
|