disabled.vue 596 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <template>
  2. <el-select v-model="value" disabled placeholder="Select">
  3. <el-option
  4. v-for="item in options"
  5. :key="item.value"
  6. :label="item.label"
  7. :value="item.value"
  8. />
  9. </el-select>
  10. </template>
  11. <script lang="ts" setup>
  12. import { ref } from 'vue'
  13. const value = ref('')
  14. const options = [
  15. {
  16. value: 'Option1',
  17. label: 'Option1',
  18. },
  19. {
  20. value: 'Option2',
  21. label: 'Option2',
  22. },
  23. {
  24. value: 'Option3',
  25. label: 'Option3',
  26. },
  27. {
  28. value: 'Option4',
  29. label: 'Option4',
  30. },
  31. {
  32. value: 'Option5',
  33. label: 'Option5',
  34. },
  35. ]
  36. </script>