form-1.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <template>
  2. <div id="index">
  3. <el-row>
  4. <el-col :span="24" class="main">
  5. <el-col :span="24" class="one">
  6. <el-form label-position="top" ref="ruleFormRef" :model="form" :rules="rules" label-width="80px" class="form">
  7. <el-row :gutter="20">
  8. <el-col :span="12">
  9. <el-form-item label="姓名" prop="name">
  10. <el-input size="large" clearable v-model="form.name" placeholder="请输入姓名"> </el-input>
  11. </el-form-item>
  12. </el-col>
  13. <el-col :span="12">
  14. <el-form-item label="电话号" prop="phone">
  15. <el-input size="large" clearable v-model="form.phone" placeholder="请输入电话号"> </el-input>
  16. </el-form-item>
  17. </el-col>
  18. </el-row>
  19. <el-row :gutter="20">
  20. <el-col :span="12">
  21. <el-form-item label="证件类型" prop="cardType">
  22. <el-select clearable v-model="form.cardType" placeholder="请选择证件类型">
  23. <el-option v-for="(item, index) in cardTypeList" :key="index" :label="item.label" :value="item.value" />
  24. </el-select>
  25. </el-form-item>
  26. </el-col>
  27. <el-col :span="12">
  28. <el-form-item label="证件号码" prop="card">
  29. <el-input size="large" clearable v-model="form.card" placeholder="请输入证件号码"> </el-input>
  30. </el-form-item>
  31. </el-col>
  32. </el-row>
  33. <el-row :gutter="20">
  34. <el-col :span="12">
  35. <el-form-item label="微信/QQ" prop="communication">
  36. <el-input size="large" clearable v-model="form.communication" placeholder="请输入微信/QQ"> </el-input>
  37. </el-form-item>
  38. </el-col>
  39. <el-col :span="12">
  40. <el-form-item label="电子邮箱" prop="email">
  41. <el-input size="large" clearable v-model="form.email" placeholder="请输入电子邮箱"> </el-input>
  42. </el-form-item>
  43. </el-col>
  44. </el-row>
  45. <el-form-item label="备注" prop="brief">
  46. <el-input size="large" v-model="form.remark" :autosize="{ minRows: 2, maxRows: 8 }" type="textarea" placeholder="请输入备注" />
  47. </el-form-item>
  48. <el-form-item>
  49. <el-col :span="24" class="button">
  50. <el-button type="primary" @click="submitForm(ruleFormRef)">确定</el-button>
  51. </el-col>
  52. </el-form-item>
  53. </el-form>
  54. </el-col>
  55. </el-col>
  56. </el-row>
  57. </div>
  58. </template>
  59. <script setup>
  60. const ruleFormRef = inject('ruleFormRef')
  61. const form = inject('form')
  62. const rules = inject('rules')
  63. const cardTypeList = inject('cardTypeList')
  64. const submitForm = inject('submitForm')
  65. </script>
  66. <style scoped lang="scss">
  67. .main {
  68. .one {
  69. .button {
  70. text-align: center;
  71. }
  72. }
  73. }
  74. </style>