|
|
@@ -1,87 +1,108 @@
|
|
|
<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>
|
|
|
- <enRadio v-model="sex" label="性别性别" :radioData="radioData"></enRadio>
|
|
|
- <enSwitch v-model="status" label="状态试" ></enSwitch>
|
|
|
- <enTextarea v-model="content" label="个人简介"></enTextarea>
|
|
|
- <enDate v-model="birthday" type="datetime" label="生日生日"></enDate>
|
|
|
-
|
|
|
-
|
|
|
- <view class="" @click="toList()">进入列表演示</view>
|
|
|
- </view>
|
|
|
+ <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>
|
|
|
+ <enRadio v-model="sex" label="性别性别" :radioData="radioData"></enRadio>
|
|
|
+ <enSwitch v-model="status" label="状态试"></enSwitch>
|
|
|
+ <enTextarea v-model="content" label="个人简介"></enTextarea>
|
|
|
+ <enDate v-model="birthday" type="datetime" label="生日生日"></enDate>
|
|
|
+
|
|
|
+ <enHeadImg v-model="img" label="修改头像"></enHeadImg>
|
|
|
+
|
|
|
+
|
|
|
+ <view class="" @click="toList()">进入列表演示</view>
|
|
|
+ </view>
|
|
|
|
|
|
</template>
|
|
|
<script>
|
|
|
+ import enInput from "components/en-from/en-input/en-input"
|
|
|
+ import enSend from "components/en-from/en-send/en-send"
|
|
|
+ import enCheckbox from "components/en-from/en-checkbox/en-checkbox"
|
|
|
+ import enRadio from "components/en-from/en-radio/en-radio"
|
|
|
+ import enSwitch from "components/en-from/en-switch/en-switch"
|
|
|
+ import enTextarea from "components/en-from/en-textarea/en-textarea"
|
|
|
+ import enDate from "components/en-from/en-date/en-date"
|
|
|
+ import enHeadImg from "@/components/en-utils/en-head-img.vue"
|
|
|
|
|
|
- import enInput from "components/en-from/en-input/en-input"
|
|
|
- import enSend from "components/en-from/en-send/en-send"
|
|
|
- import enCheckbox from "components/en-from/en-checkbox/en-checkbox"
|
|
|
- import enRadio from "components/en-from/en-radio/en-radio"
|
|
|
- import enSwitch from "components/en-from/en-switch/en-switch"
|
|
|
- import enTextarea from "components/en-from/en-textarea/en-textarea"
|
|
|
- import enDate from "components/en-from/en-date/en-date"
|
|
|
export default {
|
|
|
components: {
|
|
|
- enDate,
|
|
|
- enTextarea,
|
|
|
- enSwitch,
|
|
|
- enRadio,
|
|
|
- enCheckbox,
|
|
|
- enInput,
|
|
|
- enSend
|
|
|
+ enDate,
|
|
|
+ enTextarea,
|
|
|
+ enSwitch,
|
|
|
+ enRadio,
|
|
|
+ enCheckbox,
|
|
|
+ enInput,
|
|
|
+ enSend,
|
|
|
+ enHeadImg
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- phone:'13900139001',
|
|
|
- birthday:'',
|
|
|
- text:'来自火星的你',
|
|
|
- content:'你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?',
|
|
|
- type:['1'],
|
|
|
- sex:'1',
|
|
|
- status:1,
|
|
|
- // 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':'排球'}],
|
|
|
- radioData:[{'id':'1','name':'男'},{'id':'2','name':'女'}]
|
|
|
+ img:require('@/static/img/2.jpg'),
|
|
|
+
|
|
|
+ phone: '13900139001',
|
|
|
+ birthday: '',
|
|
|
+ text: '来自火星的你',
|
|
|
+ content: '你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?你会火星语吗?',
|
|
|
+ type: ['1'],
|
|
|
+ sex: '1',
|
|
|
+ status: 1,
|
|
|
+ // 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': '排球'
|
|
|
+ }],
|
|
|
+ radioData: [{
|
|
|
+ 'id': '1',
|
|
|
+ 'name': '男'
|
|
|
+ }, {
|
|
|
+ 'id': '2',
|
|
|
+ 'name': '女'
|
|
|
+ }]
|
|
|
}
|
|
|
},
|
|
|
- watch:{
|
|
|
- 'birthday':function (){
|
|
|
- console.log('new--------birthday',this.birthday)
|
|
|
- },
|
|
|
- 'content':function (){
|
|
|
- console.log('new--------content',this.content)
|
|
|
- },
|
|
|
- 'type':function (){
|
|
|
- console.log('new--------type',this.type)
|
|
|
- },
|
|
|
- 'phone':function (){
|
|
|
- console.log('new--------'+this.phone)
|
|
|
- },
|
|
|
- 'text':function (){
|
|
|
- console.log('new--------'+this.text)
|
|
|
- },
|
|
|
- 'status':function (){
|
|
|
- console.log('new--------'+this.status)
|
|
|
- }
|
|
|
+ watch: {
|
|
|
+ 'birthday': function() {
|
|
|
+ console.log('new--------birthday', this.birthday)
|
|
|
+ },
|
|
|
+ 'content': function() {
|
|
|
+ console.log('new--------content', this.content)
|
|
|
+ },
|
|
|
+ 'type': function() {
|
|
|
+ console.log('new--------type', this.type)
|
|
|
+ },
|
|
|
+ 'phone': function() {
|
|
|
+ console.log('new--------' + this.phone)
|
|
|
+ },
|
|
|
+ 'text': function() {
|
|
|
+ console.log('new--------' + this.text)
|
|
|
+ },
|
|
|
+ 'status': function() {
|
|
|
+ console.log('new--------' + this.status)
|
|
|
+ }
|
|
|
|
|
|
- },
|
|
|
+ },
|
|
|
|
|
|
mounted() {
|
|
|
|
|
|
},
|
|
|
methods: {
|
|
|
- getCode(){
|
|
|
- console.log('---------------------asdsa')
|
|
|
- this.text='abc'
|
|
|
- this.$refs.enSendObj.setCodeNum()
|
|
|
- },
|
|
|
- toList(){
|
|
|
+ getCode() {
|
|
|
+ console.log('---------------------asdsa')
|
|
|
+ this.text = 'abc'
|
|
|
+ this.$refs.enSendObj.setCodeNum()
|
|
|
+ },
|
|
|
+ toList() {
|
|
|
uni.navigateTo({
|
|
|
- url:'/pages/text/index'
|
|
|
+ url: '/pages/text/index'
|
|
|
})
|
|
|
},
|
|
|
|
|
|
@@ -89,11 +110,12 @@
|
|
|
}
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
-.border-item{
|
|
|
- border-bottom: 2rpx solid #F0F0F0;
|
|
|
-}
|
|
|
-.box-data{
|
|
|
- padding: 32rpx 32rpx 0;
|
|
|
- background-color: #fff;
|
|
|
-}
|
|
|
+ .border-item {
|
|
|
+ border-bottom: 2rpx solid #F0F0F0;
|
|
|
+ }
|
|
|
+
|
|
|
+ .box-data {
|
|
|
+ padding: 32rpx 32rpx 0;
|
|
|
+ background-color: #fff;
|
|
|
+ }
|
|
|
</style>
|