filterable.vue 442 B

1234567891011121314
  1. <template>
  2. <el-select-v2 v-model="value" filterable :options="options" placeholder="Please select" style="width: 240px" multiple />
  3. </template>
  4. <script lang="ts" setup>
  5. import { ref } from 'vue'
  6. const initials = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j']
  7. const value = ref([])
  8. const options = Array.from({ length: 1000 }).map((_, idx) => ({
  9. value: `Option${idx + 1}`,
  10. label: `${initials[idx % 10]}${idx}`,
  11. }))
  12. </script>