<template>
	<view class="box">
    <Nav title="首页"></Nav>
    <enCheckbox v-model="type"  label="用户类型" :checkboxData="checkboxData"></enCheckbox>
    <enInput v-model="text" label="用户姓名"></enInput>
    <enSend v-model="phone" ref="enSendObj" @getCode="getCode"></enSend>
    <enInput v-model="text" label="用户姓名"></enInput>
	</view>

</template>
<script>

  import enInput from "components/en-input/en-input"
  import enSend from "components/en-send/en-send"
  import enCheckbox from "components/en-checkbox/en-checkbox"
	export default {
		components: {
      enCheckbox,
      enInput,
      enSend
		},
		data() {
			return {
        phone:'13900139001',
        text:'asdsa',
        type:[],
        // 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':'乒乓球'}]
        checkboxData:[{'id':'1','name':'足球'},{'id':'2','name':'篮球'},{'id':'3','name':'排球'}]
			}
		},
    watch:{
      'type':function (){
        console.log('new--------type',this.type)
      },
		  'phone':function (){
        console.log('new--------'+this.phone)
      },
      'text':function (){
        console.log('new--------'+this.text)
      }

    },

		mounted() {

		},
		methods: {
      getCode(){
        console.log('---------------------asdsa')
        this.text='abc'
        this.$refs.enSendObj.setCodeNum()
      },


		},
	}
</script>
<style lang="scss" scoped>
.box{
  padding: 32rpx 32rpx 0;
  background-color: #fff;
}
</style>
