sys 3 éve
szülő
commit
284a82089a

+ 15 - 5
components/en-from/en-head/en-head-img.vue

@@ -1,10 +1,10 @@
 <template>
 	<view>
 		<view class="box" @click="isShowPop(true)">
-			<image class="left" :src="value" mode="aspectFill"></image>
+			<image class="left" :src="headImg" mode="aspectFill"></image>
 			<view class="right">
 				<text>{{label}}</text>
-				<image src="@/static/img/toRight.png" mode=""></image>
+        <image src="@/static/img/toRight.png" mode=""></image>
 			</view>
 		</view>
     <uni-popup ref="popup" type="bottom">
@@ -33,9 +33,19 @@
 			},
 		},
 		data(){
-			return{}
+			return{
+			  headImg:''
+      }
 		},
-		methods:{
+    watch:{
+		  'headImg':function (){
+		    this.$emit('input',this.headImg)
+      }
+    },
+    mounted() {
+		  this.headImg=this.value
+    },
+    methods:{
 			isShowPop(type){
 
 				if(tools.getPlatform()==='H5'){
@@ -66,7 +76,7 @@
 			upLoadOss(path){
 				 upLoadingFileOss(path).then((res)=>{
 					 if(res){
-						 this.value = res
+						 this.headImg = res
 					 }else{
 						 tools.error('头像上传失败')
 					 }

+ 2 - 3
components/en-from/en-switch/en-switch.vue

@@ -4,7 +4,7 @@
       <view class="input-box-left" :style="{'letter-spacing':labelWidth}">
         {{ label }}
       </view>
-      <switch  color="#3169FA" style="transform:scale(0.7)" :checked="inputValue" @change="switchChange" />
+      <switch  color="#3169FA" style="transform:scale(0.7)" :checked="true" @change="switchChange" />
     </view>
   </view>
 </template>
@@ -39,9 +39,8 @@ export default {
   },
   components: {},
   mounted() {
-    this.inputValue = this.value
     this.setLabelWidth()
-
+    this.setValue()
   },
   watch: {
     'value': function () {

+ 2 - 2
components/en-from/en-upload/en-upload.vue

@@ -158,7 +158,7 @@ export default {
         urls: imgList,
         current: index,
         success: () => {
-          
+
         }
       })
     },
@@ -296,7 +296,7 @@ export default {
       if (this.tempItem) {
         this.imageList.forEach(v => {
           v.disable = true
-          v.zIndex = v.index + 9
+          v.zIndex = v.index + 1
           v.offset = 0
           v.moveEnd = false
           if (v.id == this.tempItem.id) {

+ 8 - 9
pages/index/index.vue

@@ -2,16 +2,15 @@
 	<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>-->
-
+		<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>
-		<enUpload v-model="imgs" label="修改头像"></enUpload>
+		<enUpload v-model="imgs" ></enUpload>
 
 
 <!--		<view class="" @click="toList()">进入列表演示</view>-->