uu
This commit is contained in:
parent
109dc41604
commit
86cfd4d71d
@ -14,7 +14,11 @@
|
||||
return ''
|
||||
}
|
||||
},
|
||||
placeholder: '',
|
||||
placeholder:{
|
||||
default () {
|
||||
return ''
|
||||
}
|
||||
},
|
||||
},
|
||||
data() {
|
||||
},
|
||||
|
||||
@ -13,7 +13,11 @@
|
||||
return ''
|
||||
}
|
||||
},
|
||||
placeholder: '',
|
||||
placeholder:{
|
||||
default () {
|
||||
return ''
|
||||
}
|
||||
},
|
||||
},
|
||||
data() {
|
||||
},
|
||||
|
||||
70
components/tpx-upload/tpx-upload.vue
Normal file
70
components/tpx-upload/tpx-upload.vue
Normal file
@ -0,0 +1,70 @@
|
||||
<template>
|
||||
<u-upload
|
||||
:fileList="fileList1" name="formFilesTODO" :maxCount="max" :previewFullImage="fileType==fileTypeEnum.image"
|
||||
@afterRead="afterRead" @delete="deletePic"
|
||||
>
|
||||
<slot></slot>
|
||||
</u-upload>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
const fileTypeEnum = {
|
||||
all: "all",
|
||||
image: "image",
|
||||
video: "video",
|
||||
}
|
||||
|
||||
export default {
|
||||
|
||||
props: {
|
||||
value: {
|
||||
default () {
|
||||
return ''
|
||||
}
|
||||
},
|
||||
fileType: {
|
||||
default () {
|
||||
return fileTypeEnum.all
|
||||
}
|
||||
},
|
||||
max: {
|
||||
default () {
|
||||
return 1
|
||||
}
|
||||
},
|
||||
min: {
|
||||
default () {
|
||||
return 1
|
||||
}
|
||||
},
|
||||
scale: {
|
||||
default () {
|
||||
return [1, 1] // 宽高比
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
fileTypeEnum: Object.assign({}, fileTypeEnum),
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
onHide() {
|
||||
|
||||
},
|
||||
destroyed() {},
|
||||
|
||||
methods: {
|
||||
handleChange(val){
|
||||
this.$emit('change', val)
|
||||
this.$emit('update:value', val)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
</style>
|
||||
@ -3,7 +3,7 @@
|
||||
<template v-slot:body>
|
||||
<view class="com-jianju pos-rlt pb-30" style="padding-top: 2rpx;">
|
||||
|
||||
<view class="blcok-white radius-20 pt-30 ">
|
||||
<view class="blcok-white radius-20" style="padding-top: 40rpx;">
|
||||
<uni-forms ref="baseForm" :modelValue="baseFormData" label-width="0">
|
||||
<uni-forms-item :required="false">
|
||||
<tpx-input v-model:value="baseFormData.name" placeholder="真实姓名"></tpx-input>
|
||||
@ -16,6 +16,22 @@
|
||||
<uni-forms-item :required="false">
|
||||
<tpx-input v-model:value="baseFormData.number" placeholder="证件号"></tpx-input>
|
||||
</uni-forms-item>
|
||||
|
||||
<view class="mb-10">
|
||||
<u-row justify="between">
|
||||
<u-col span="5">
|
||||
<tpx-upload v-model:value="baseFormData.pic1">
|
||||
<u-text :text="'身份证人像面'" size="28" :scale="[7, 10]"></u-text>
|
||||
</tpx-upload>
|
||||
</u-col>
|
||||
<u-col span="5">
|
||||
<tpx-upload v-model:value="baseFormData.pic2">
|
||||
<u-text :text="'身份证人像面'" size="28" :scale="[7, 10]"></u-text>
|
||||
</tpx-upload>
|
||||
</u-col>
|
||||
</u-row>
|
||||
</view>
|
||||
|
||||
</uni-forms>
|
||||
</view>
|
||||
|
||||
@ -49,6 +65,7 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
fileList1: [],
|
||||
typeList: [
|
||||
{ title: '身份证', val: 1 },
|
||||
{ title: '护照', val: 2 },
|
||||
|
||||
Loading…
Reference in New Issue
Block a user