| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- <template>
- <view class="box-data">
- <Nav title="首页"></Nav>
- <view class="border-item"></view>
- <enInput v-model="text" label="用户姓名"></enInput>
- <enSend v-model="phone" ref="enSendObj" @getCode="getCode"></enSend>
- <enCheckbox v-model="type" label="用户爱好" :checkboxData="checkboxData"></enCheckbox>
- </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>
- .border-item{
- border-bottom: 2rpx solid #F0F0F0;
- }
- .box-data{
- padding: 32rpx 32rpx 0;
- background-color: #fff;
- }
- </style>
|