demo6.vue 665 B

123456789101112131415161718192021222324252627
  1. <template>
  2. <m-select v-model="selVal" searchable>
  3. <m-option
  4. v-for="item in options"
  5. :key="item.value"
  6. :label="item.label"
  7. :value="item.value">
  8. </m-option>
  9. </m-select>
  10. </template>
  11. <script setup>
  12. import { ref } from 'vue-demi'
  13. const selVal = ref('')
  14. const options = [
  15. { value: 'value1',label: 'Option1'},
  16. { value: 'value2',label: 'Option2'},
  17. { value: 'value3',label: 'Option3'},
  18. { value: 'value4',label: 'Option4'},
  19. { value: 'value5',label: 'Option5'},
  20. { value: 'value6',label: 'Option6'},
  21. { value: 'value7',label: 'Option7'},
  22. { value: 'value8',label: 'Option8'},
  23. { value: 'value9',label: 'Option9'}
  24. ]
  25. </script>