accessibility.vue 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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 replacements for using the "label" attribute.
  16. </p>
  17. </el-alert>
  18. <el-form-item label="Your Information">
  19. <el-row :gutter="20">
  20. <el-col :span="12">
  21. <el-input v-model="formAccessibility.firstName" label="First Name" placeholder="First Name" />
  22. </el-col>
  23. <el-col :span="12">
  24. <el-input v-model="formAccessibility.lastName" label="Last Name" placeholder="Last Name" />
  25. </el-col>
  26. </el-row>
  27. </el-form-item>
  28. </el-space>
  29. </el-form>
  30. </template>
  31. <script lang="ts" setup>
  32. import { reactive } from 'vue'
  33. const formAccessibility = reactive({
  34. fullName: '',
  35. firstName: '',
  36. lastName: '',
  37. })
  38. </script>