<template>
	<view class="box">
    <Nav title="首页"></Nav>
    <enInput v-model="text" name="用户姓名"></enInput>
    <enSend v-model="phone" ref="enSendObj" @getCode="getCode"></enSend>
	</view>
</template>
<script>

  import enInput from "components/en-input/en-input"
  import enSend from "components/en-send/en-send"
	export default {
		components: {
      enInput,
      enSend
		},
		data() {
			return {
        phone:'13900139001',
        text:'asdsa',
			}
		},
    watch:{
		  '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>
