43 lines
717 B
Vue
43 lines
717 B
Vue
<template>
|
|
|
|
<u-upload
|
|
:file-list="previewFileList"
|
|
:maxCount="1"
|
|
@after-read="afterRead"
|
|
@delete="onDelete"
|
|
:width="width"
|
|
:height="height"
|
|
>
|
|
<image
|
|
:src="src"
|
|
mode="widthFix"
|
|
:style="[{
|
|
width: width,
|
|
height: height
|
|
}]"
|
|
/>
|
|
</u-upload>
|
|
</template>
|
|
<script>
|
|
import {$upload} from "@/utils/mixins";
|
|
|
|
export default {
|
|
name: "IdcardUpload",
|
|
mixins: [$upload],
|
|
props: {
|
|
width: {
|
|
type: String,
|
|
default: "100%"
|
|
},
|
|
height: {
|
|
type: String,
|
|
default: "fit-content"
|
|
},
|
|
src: {
|
|
type: String,
|
|
default: 'https://cdn.uviewui.com/uview/demo/upload/positive.png'
|
|
}
|
|
}
|
|
}
|
|
</script>
|