fix: 修复 FaFileUpload 和 FaImageUpload 在表单中点击可能会触发表单提交

This commit is contained in:
Hooray
2025-09-05 16:10:56 +08:00
parent ca25b1ae89
commit a16f9232f9
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -163,6 +163,7 @@ function removeFile(idx: number) {
<template>
<div class="space-y-2">
<button
type="button"
class="h-40 w-full flex flex-col cursor-pointer items-center justify-center border border-2 rounded-lg border-dashed bg-transparent p-4 transition-all"
:class="{
'border-primary bg-primary/5': isDragging,
+1 -1
View File
@@ -182,7 +182,7 @@ function onMove(index: number, direction: 'forward' | 'backward') {
</div>
</div>
<button
v-if="images.length < props.max || props.max === 0" class="relative flex-center overflow-hidden bg-transparent" :class="{
v-if="images.length < props.max || props.max === 0" type="button" class="relative flex-center overflow-hidden bg-transparent" :class="{
'cursor-not-allowed': props.disabled || isUploading,
}" :style="{
width: `${props.width}px`,