mirror of
https://github.com/fantastic-admin/basic.git
synced 2026-10-07 15:48:05 +08:00
fix: 修复 FaFileUpload 和 FaImageUpload 在表单中点击可能会触发表单提交
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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`,
|
||||
|
||||
Reference in New Issue
Block a user