multiple.vue 463 B

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