|
@@ -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"></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>
|