From 884e16e6e1654c3de20bd6441973d8e0a6aeac5f Mon Sep 17 00:00:00 2001 From: miaoxinyu01 <133218218+miaoxinyu01@users.noreply.github.com> Date: Mon, 30 Oct 2023 12:46:23 +0800 Subject: [PATCH] =?UTF-8?q?styles:=20InputFile=E7=BB=84=E4=BB=B6=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E8=B0=83=E6=95=B4=20(#8522)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: InputFile组件样式调整 * 文件上传css变量设置 --- packages/amis-ui/scss/components/form/_file.scss | 2 ++ packages/amis/src/renderers/Form/InputFile.tsx | 15 ++++++--------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/packages/amis-ui/scss/components/form/_file.scss b/packages/amis-ui/scss/components/form/_file.scss index 7bea24545..e7abe2f7f 100644 --- a/packages/amis-ui/scss/components/form/_file.scss +++ b/packages/amis-ui/scss/components/form/_file.scss @@ -47,6 +47,8 @@ // } &-description { + margin-top: var(--inputFile-base-des-margin); + line-height: 20px; color: var(--inputFile-base-des-color); font-size: var(--inputFile-base-des-fontSize); font-weight: var(--inputFile-base-des-fontWeight); diff --git a/packages/amis/src/renderers/Form/InputFile.tsx b/packages/amis/src/renderers/Form/InputFile.tsx index 86366f5b9..2778cbe97 100644 --- a/packages/amis/src/renderers/Form/InputFile.tsx +++ b/packages/amis/src/renderers/Form/InputFile.tsx @@ -1447,7 +1447,7 @@ export default class FileControl extends React.Component { ) : ( <> )} - {description - ? render('desc', description, { - className: cx( - 'FileControl-description', - descriptionClassName - ) - }) - : null} )} + {description + ? render('desc', description, { + className: cx('FileControl-description', descriptionClassName) + }) + : null} {maxSize && !drag ? (
{__('File.sizeLimit', {maxSize: prettyBytes(maxSize, 1024)})}