index.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. <template>
  2. <view class="box-data">
  3. <Nav title="首页"></Nav>
  4. <!-- <view class="border-item"></view>-->
  5. <enInput v-model="text" label="姓名姓名"></enInput>
  6. <!-- <enSend v-model="phone" ref="enSendObj" @getCode="getCode"></enSend>-->
  7. <!-- <enCheckbox v-model="type" label="爱好爱好" :checkboxData="checkboxData"></enCheckbox>-->
  8. <!-- <enRadio v-model="sex" label="性别性别" :radioData="radioData"></enRadio>-->
  9. <!-- <enSwitch v-model="status" label="状态试"></enSwitch>-->
  10. <!-- <enTextarea v-model="content" label="个人简介"></enTextarea>-->
  11. <!-- <enDate v-model="birthday" type="datetime" label="生日生日"></enDate>-->
  12. <enHeadImg v-model="img" label="修改头像"></enHeadImg>
  13. <enSelect v-model="classIds" label="班级"></enSelect>
  14. <enUpload v-model="imgs" ></enUpload>
  15. <!-- <view class="" @click="toList()">进入列表演示</view>-->
  16. </view>
  17. </template>
  18. <script>
  19. import enInput from "components/en-from/en-input/en-input"
  20. import enSend from "components/en-from/en-send/en-send"
  21. import enCheckbox from "components/en-from/en-checkbox/en-checkbox"
  22. import enRadio from "components/en-from/en-radio/en-radio"
  23. import enSwitch from "components/en-from/en-switch/en-switch"
  24. import enTextarea from "components/en-from/en-textarea/en-textarea"
  25. import enDate from "components/en-from/en-date/en-date"
  26. import enHeadImg from "components/en-from/en-head/en-head-img"
  27. import enUpload from "components/en-from/en-upload/en-upload"
  28. import enSelect from "components/en-from/en-select/en-select"
  29. export default {
  30. components: {
  31. enSelect,
  32. enUpload,
  33. enDate,
  34. enTextarea,
  35. enSwitch,
  36. enRadio,
  37. enCheckbox,
  38. enInput,
  39. enSend,
  40. enHeadImg
  41. },
  42. data() {
  43. return {
  44. img:require('@/static/img/2.jpg'),
  45. imgs:[require('@/static/img/2.jpg')],
  46. phone: '13900139001',
  47. classIds: '2-0,2-2',
  48. birthday: '',
  49. text: '',
  50. content: '你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?',
  51. type: ['1'],
  52. sex: '1',
  53. status: 1,
  54. // checkboxData:[{'id':'1','name':'足球'},{'id':'2','name':'篮球'},{'id':'3','name':'排球'},{'id':'4','name':'羽毛球'},{'id':'5','name':'乒乓球'},{'id':'6','name':'铅球'},{'id':'7','name':'棒球'},{'id':'8','name':'冰球'},{'id':'9','name':'网球'},{'id':'10','name':'乒乓球'}]
  55. checkboxData: [{
  56. 'id': '1',
  57. 'name': '足球'
  58. }, {
  59. 'id': '2',
  60. 'name': '篮球'
  61. }, {
  62. 'id': '3',
  63. 'name': '排球'
  64. }],
  65. radioData: [{
  66. 'id': '1',
  67. 'name': '男'
  68. }, {
  69. 'id': '2',
  70. 'name': '女'
  71. }]
  72. }
  73. },
  74. watch: {
  75. 'classIds': function() {
  76. console.log('new--------classIds', this.classIds)
  77. },
  78. 'imgs': function() {
  79. console.log('new--------imgs', this.imgs)
  80. },
  81. 'birthday': function() {
  82. console.log('new--------birthday', this.birthday)
  83. },
  84. 'content': function() {
  85. console.log('new--------content', this.content)
  86. },
  87. 'type': function() {
  88. console.log('new--------type', this.type)
  89. },
  90. 'phone': function() {
  91. console.log('new--------' + this.phone)
  92. },
  93. 'text': function() {
  94. console.log('new--------' + this.text)
  95. },
  96. 'status': function() {
  97. console.log('new--------' + this.status)
  98. }
  99. },
  100. mounted() {
  101. },
  102. methods: {
  103. getCode() {
  104. console.log('---------------------asdsa')
  105. this.text = 'abc'
  106. this.$refs.enSendObj.setCodeNum()
  107. },
  108. toList() {
  109. uni.navigateTo({
  110. url: '/pages/text/index'
  111. })
  112. },
  113. },
  114. }
  115. </script>
  116. <style lang="scss" scoped>
  117. .border-item {
  118. border-bottom: 2rpx solid #F0F0F0;
  119. }
  120. .box-data {
  121. padding: 32rpx 32rpx 0;
  122. background-color: #fff;
  123. }
  124. </style>