From 1bf32c7f7e58af2df86a098d0dec9995b9b49b08 Mon Sep 17 00:00:00 2001 From: chenos Date: Sun, 25 Apr 2021 11:55:32 +0800 Subject: [PATCH] fix: image can not be previewed --- packages/app/src/components/views/Field/index.tsx | 6 +----- packages/app/src/components/views/style.less | 4 +--- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/packages/app/src/components/views/Field/index.tsx b/packages/app/src/components/views/Field/index.tsx index ec1a5c84f6..b54a4dc329 100644 --- a/packages/app/src/components/views/Field/index.tsx +++ b/packages/app/src/components/views/Field/index.tsx @@ -446,11 +446,7 @@ export function AttachmentFieldItem(props: any) { { e.stopPropagation(); - if ( - testUrl(url, { - exclude: ['.png', '.jpg', '.jpeg', '.gif'], - }) - ) { + if (testUrl(url)) { props.onClick && props.onClick(); // setVisible(true); e.preventDefault(); diff --git a/packages/app/src/components/views/style.less b/packages/app/src/components/views/style.less index e075ded557..6cb38b546e 100644 --- a/packages/app/src/components/views/style.less +++ b/packages/app/src/components/views/style.less @@ -1,7 +1,5 @@ .ant-drawer-body { - > div { - margin-bottom: 50px; - } + padding-bottom: 50px; .form-button-group { position: absolute; bottom: 0;