index.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  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" :local-data="[]" label="班级"></enSelect>
  14. <!-- <enUpload v-model="imgs" ></enUpload>-->
  15. <view class="" @click="toList()">进入列表演示</view>
  16. <button class="box-but" style="background-color: #DD524D;color: #FFFFFF">确定</button>
  17. </view>
  18. </template>
  19. <script>
  20. import enInput from "components/en-from/en-input/en-input"
  21. import enSend from "components/en-from/en-send/en-send"
  22. import enCheckbox from "components/en-from/en-checkbox/en-checkbox"
  23. import enRadio from "components/en-from/en-radio/en-radio"
  24. import enSwitch from "components/en-from/en-switch/en-switch"
  25. import enTextarea from "components/en-from/en-textarea/en-textarea"
  26. import enDate from "components/en-from/en-date/en-date"
  27. import enHeadImg from "components/en-from/en-head/en-head-img"
  28. import enUpload from "components/en-from/en-upload/en-upload"
  29. import enSelect from "components/en-from/en-select/en-select"
  30. export default {
  31. components: {
  32. enSelect,
  33. enUpload,
  34. enDate,
  35. enTextarea,
  36. enSwitch,
  37. enRadio,
  38. enCheckbox,
  39. enInput,
  40. enSend,
  41. enHeadImg
  42. },
  43. data() {
  44. return {
  45. img:require('@/static/img/2.jpg'),
  46. imgs:[require('@/static/img/2.jpg')],
  47. phone: '13900139001',
  48. classIds: '2-0,2-2',
  49. birthday: '',
  50. text: '',
  51. content: '你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?',
  52. type: ['1'],
  53. sex: '1',
  54. status: 1,
  55. // 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':'乒乓球'}]
  56. checkboxData: [{
  57. 'id': '1',
  58. 'name': '足球'
  59. }, {
  60. 'id': '2',
  61. 'name': '篮球'
  62. }, {
  63. 'id': '3',
  64. 'name': '排球'
  65. }],
  66. radioData: [{
  67. 'id': '1',
  68. 'name': '男'
  69. }, {
  70. 'id': '2',
  71. 'name': '女'
  72. }]
  73. }
  74. },
  75. watch: {
  76. 'classIds': function() {
  77. console.log('new--------classIds', this.classIds)
  78. },
  79. 'imgs': function() {
  80. console.log('new--------imgs', this.imgs)
  81. },
  82. 'birthday': function() {
  83. console.log('new--------birthday', this.birthday)
  84. },
  85. 'content': function() {
  86. console.log('new--------content', this.content)
  87. },
  88. 'type': function() {
  89. console.log('new--------type', this.type)
  90. },
  91. 'phone': function() {
  92. console.log('new--------' + this.phone)
  93. },
  94. 'text': function() {
  95. console.log('new--------' + this.text)
  96. },
  97. 'status': function() {
  98. console.log('new--------' + this.status)
  99. }
  100. },
  101. mounted() {
  102. },
  103. methods: {
  104. getCode() {
  105. console.log('---------------------asdsa')
  106. this.text = 'abc'
  107. this.$refs.enSendObj.setCodeNum()
  108. },
  109. toList() {
  110. uni.navigateTo({
  111. url: '/pages/text/index'
  112. })
  113. },
  114. },
  115. }
  116. </script>
  117. <style lang="scss" scoped>
  118. .border-item {
  119. border-bottom: 2rpx solid #F0F0F0;
  120. }
  121. .box-data {
  122. min-height: 100vh;
  123. padding: 32rpx 32rpx 0;
  124. background-color: #fff;
  125. .box-but{
  126. position: fixed;
  127. width: 80%;
  128. left: 10%;
  129. bottom: 40rpx;
  130. }
  131. }
  132. </style>