feat: 支持拖拽上传 disabled样式优化

This commit is contained in:
dap
2025-03-28 18:02:54 +08:00
parent 8c1cd617ad
commit dd57e3c9ae
5 changed files with 79 additions and 10 deletions

View File

@@ -130,12 +130,21 @@ const { previewVisible, previewImage, handleCancel, handlePreview } =
scope="global"
keypath="component.upload.uploadHelpMessage"
tag="div"
:class="{ 'upload-text__disabled': disabled }"
>
<template #size>
<span class="text-primary mx-1 font-medium"> {{ maxSize }}MB </span>
<span
class="text-primary mx-1 font-medium"
:class="{ 'upload-text__disabled': disabled }"
>
{{ maxSize }}MB
</span>
</template>
<template #ext>
<span class="text-primary mx-1 font-medium">
<span
class="text-primary mx-1 font-medium"
:class="{ 'upload-text__disabled': disabled }"
>
{{ acceptFormat }}
</span>
</template>
@@ -167,4 +176,14 @@ const { previewVisible, previewImage, handleCancel, handlePreview } =
border-radius: 4px;
}
}
// 禁用的样式和antd保持一致
.upload-text__disabled {
color: rgb(50 54 57 / 25%);
cursor: not-allowed;
&:where(.dark, .dark *) {
color: rgb(242 242 242 / 25%);
}
}
</style>