accessibility.vue 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <template>
  2. <el-form label-position="left" label-width="150px" style="max-width: 460px">
  3. <el-space fill>
  4. <el-alert type="info" show-icon :closable="false">
  5. <p>"Full Name" label is automatically attached to the input:</p>
  6. </el-alert>
  7. <el-form-item label="Full Name">
  8. <el-input v-model="formAccessibility.fullName" />
  9. </el-form-item>
  10. </el-space>
  11. <el-space fill>
  12. <el-alert type="info" show-icon :closable="false">
  13. <p>
  14. "Your Information" serves as a label for the group of inputs. <br />
  15. You must specify labels on the individal inputs. Placeholders are not
  16. replacements for using the "label" attribute.
  17. </p>
  18. </el-alert>
  19. <el-form-item label="Your Information">
  20. <el-row :gutter="20">
  21. <el-col :span="12">
  22. <el-input
  23. v-model="formAccessibility.firstName"
  24. label="First Name"
  25. placeholder="First Name"
  26. />
  27. </el-col>
  28. <el-col :span="12">
  29. <el-input
  30. v-model="formAccessibility.lastName"
  31. label="Last Name"
  32. placeholder="Last Name"
  33. />
  34. </el-col>
  35. </el-row>
  36. </el-form-item>
  37. </el-space>
  38. </el-form>
  39. </template>
  40. <script lang="ts" setup>
  41. import { reactive } from 'vue'
  42. const formAccessibility = reactive({
  43. fullName: '',
  44. firstName: '',
  45. lastName: '',
  46. })
  47. </script>