test(KYC页): 测试图片上传方式
This commit is contained in:
parent
b1db3c8d01
commit
8a257b3b02
@ -60,14 +60,20 @@
|
||||
src="/src/assets/icon/addImg.png"
|
||||
alt=""
|
||||
style="display: block; width: 15vw; aspect-ratio: 1/1; object-fit: cover"
|
||||
@click="triggerFileInput"
|
||||
/>
|
||||
<input
|
||||
ref="fileInputRef"
|
||||
type="file"
|
||||
accept="image/*"
|
||||
@change="handleFileChange"
|
||||
style="display: none"
|
||||
style="
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
opacity: 0;
|
||||
z-index: 2;
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@ -179,8 +185,6 @@ import { getWithdrawInfoList, addWithdrawInfo, updateWithdrawInfo } from '@/api/
|
||||
const { t, locale } = useI18n()
|
||||
const router = useRouter()
|
||||
|
||||
const fileInputRef = ref(null)
|
||||
|
||||
// 监听语言变化并设置文档方向
|
||||
locale.value && setDocumentDirection(locale.value)
|
||||
|
||||
@ -206,14 +210,6 @@ const checkStatus = computed(() => {
|
||||
return applyInfo.value.contactNumber != '' && previewUrls.value.length > 0
|
||||
})
|
||||
|
||||
// 点击文件选择
|
||||
const triggerFileInput = () => {
|
||||
console.log('触发文件选择')
|
||||
if (fileInputRef.value) {
|
||||
fileInputRef.value.click()
|
||||
}
|
||||
}
|
||||
|
||||
// 处理文件选择(每次选一张)
|
||||
const handleFileChange = (e) => {
|
||||
console.log('=== 文件选择事件开始 ===')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user