Explorar o código

证件照上传

李书文 %!s(int64=2) %!d(string=hai) anos
pai
achega
7c86340fb7
Modificáronse 1 ficheiros con 6 adicións e 23 borrados
  1. 6 23
      components/card/card.vue

+ 6 - 23
components/card/card.vue

@@ -1,13 +1,8 @@
 <!--证件照片上传(单张)-->
 <template>
-	<view class="sfz" @click="chooseImage()" :style="{ border: fileName ? '' : '1px solid #eeeeee' }">
+	<view class="sfz" @click="chooseImage()">
 		<image :src="ip + fileName" mode="widthFix" v-if="fileName"></image>
-		<view class="uploads" v-else>
-			<view class="bw">
-				<text class="icon">&#xe603;</text>
-				<view class="text">选择图片</view>
-			</view>
-		</view>
+		<image :src="pic" mode="widthFix" v-else></image>
 	</view>
 </template>
 <script>
@@ -17,6 +12,9 @@ export default {
 		value: {
 			type: String
 		},
+		pic: {
+			type: String
+		},
 		read: {
 			type: Boolean,
 			default: false
@@ -83,31 +81,16 @@ export default {
 };
 </script>
 
-<style lang="scss" scoped>
+<style lang="scss">
 .sfz {
 	text-align: center;
 	border-radius: 5px;
 	margin-top: 10px;
-	color: $fc;
 	overflow: hidden;
 	image {
 		width: 100%;
 		margin: 0 auto;
 		border-radius: 5px;
 	}
-	.uploads {
-		width: 100%;
-		text-align: center;
-		background-color: $bc1;
-		.bw {
-			padding: 20px;
-			.icon {
-				font-size: 50px;
-			}
-			.text {
-				color: $fc;
-			}
-		}
-	}
 }
 </style>