test(KYC页): 测试图片上传方式
This commit is contained in:
parent
085a761fa3
commit
4c47db87cd
@ -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) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user