addContact.vue 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <template>
  2. <multi-color-background top-height="2.7" show-go-back="1">
  3. <h1 class="title">添加联系人</h1>
  4. <div class="main" >
  5. <div class="input-container shadow">
  6. <mt-field label="姓名" placeholder="请输入真实姓名或公司名称" v-model="contactInfo.name"></mt-field>
  7. <mt-field label="账号" placeholder="请输入联系人账号" v-model="contactInfo.phone"></mt-field>
  8. <selector label="分类" placeholder="请选择联系人类别" :options="typeOptions" v-model="contactInfo.type"></selector>
  9. </div>
  10. <button class="submit" @click="fakeSubmit">提交</button>
  11. </div>
  12. </multi-color-background>
  13. </template>
  14. <script>
  15. import MultiColorBackground from "../components/multiColorBackground";
  16. import Selector from "../components/selector";
  17. export default {
  18. name: "addContact",
  19. components: {Selector, MultiColorBackground},
  20. data(){
  21. return{
  22. contactInfo:{
  23. name:'',
  24. phone:'',
  25. type:''
  26. },
  27. typeOptions:[
  28. '个人',
  29. '企业'
  30. ]
  31. }
  32. },
  33. methods: {
  34. fakeSubmit() {
  35. console.log(this.contactInfo)
  36. }
  37. }
  38. }
  39. </script>
  40. <style scoped>
  41. .main .input-container{
  42. background-color: white;
  43. border: 1px white solid;
  44. border-radius: 10px;
  45. }
  46. .main{
  47. margin: 0.4rem 0.4rem 0;
  48. }
  49. .submit{
  50. width: 100%;
  51. height: 1.1rem;
  52. border: none;
  53. border-radius: 0.6rem;
  54. margin-top: 1.4rem;
  55. background-color: #60c0ff;
  56. font-size: 0.4rem;
  57. color: white;
  58. }
  59. </style>