<template>
<van-uploader :max-size="5 * 1024 * 1024" :after-read="afterRead" max-count="1"
class="id-card-scan">
<slot>
<doc-icon type="doc-scan" class="shrink-0 mr-3 text-primary"/>
</slot>
</van-uploader>
</template>
<script>
import { showNotify } from 'vant'
export default {
name: 'IdCardScan',
emits: ['change'],
methods: {
// 证件上传后
afterRead(file) {
console.log(file)
showNotify({ type: 'primary', message: '文件上传' })
this.$emit('change', file)
}
}
}
</script>
<style lang="less" scoped>
</style>
-
songrui authoredf71359fb