Skip to content

Commit 705f14e

Browse files
committed
修复 FaFileUploadFaImageUpload 在表单中点击可能会触发表单提交
1 parent 3990c4f commit 705f14e

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/ui/components/FaFileUpload/index.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ function removeFile(idx: number) {
163163
<template>
164164
<div class="space-y-2">
165165
<button
166+
type="button"
166167
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"
167168
:class="{
168169
'border-primary bg-primary/5': isDragging,

src/ui/components/FaImageUpload/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ function onMove(index: number, direction: 'forward' | 'backward') {
182182
</div>
183183
</div>
184184
<button
185-
v-if="images.length < props.max || props.max === 0" class="relative flex-center overflow-hidden bg-transparent" :class="{
185+
v-if="images.length < props.max || props.max === 0" type="button" class="relative flex-center overflow-hidden bg-transparent" :class="{
186186
'cursor-not-allowed': props.disabled || isUploading,
187187
}" :style="{
188188
width: `${props.width}px`,

0 commit comments

Comments
 (0)