test(KYC页): 测试图片上传方式

This commit is contained in:
hzj 2025-11-12 14:59:00 +08:00
parent 085a761fa3
commit 4c47db87cd

View File

@ -64,6 +64,7 @@
<input
type="file"
accept="image/*"
@click="onFileInputClick"
@change="handleFileChange"
style="
position: absolute;
@ -71,7 +72,8 @@
left: 0;
width: 100%;
height: 100%;
background-color: #3dff54;
opacity: 0;
cursor: pointer;
"
/>
</div>
@ -81,6 +83,8 @@
alt=""
style="display: block; width: 5vw; aspect-ratio: 1/1; object-fit: cover"
/>
<!-- 预览图片 -->
<div v-for="(imgUrl, index) in previewUrls" :key="index" style="position: relative">
<img
:src="imgUrl"
@ -209,10 +213,15 @@ const checkStatus = computed(() => {
return applyInfo.value.contactNumber != '' && previewUrls.value.length > 0
})
//
const onFileInputClick = (event) => {
console.log('=== 点击文件选择按钮 ===')
showInfo('Please select a file')
}
// ()
const handleFileChange = (e) => {
console.log('=== 文件选择事件开始 ===')
console.log('=== 文件选择事件结束 ===')
try {
//
if (!e.target.files || e.target.files.length === 0) {