From 498a848900a93f8b58bfb682fcdc3f86e474bbdf Mon Sep 17 00:00:00 2001 From: liaoxuezhi Date: Tue, 22 Oct 2019 20:14:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E5=88=A0=E5=A4=9A=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scss/components/form/_image.scss | 23 +++++++++++++++++++++++ src/renderers/Form/Image.tsx | 3 ++- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/scss/components/form/_image.scss b/scss/components/form/_image.scss index 905240b2d..efa038785 100644 --- a/scss/components/form/_image.scss +++ b/scss/components/form/_image.scss @@ -184,4 +184,27 @@ &-uploadBtn { margin-top: 5px; } +} + + +// todo + +.cropper-wrapper { + position: relative; + + img { + max-width: 100%; + max-height: 400px; + } + + .btn { + position: absolute; + bottom: 0; + right: 0; + } + + .btn:nth-child(2n + 1) { + bottom: 40px; + right: 4px; + } } \ No newline at end of file diff --git a/src/renderers/Form/Image.tsx b/src/renderers/Form/Image.tsx index a5617eff7..70d144e91 100644 --- a/src/renderers/Form/Image.tsx +++ b/src/renderers/Form/Image.tsx @@ -216,7 +216,8 @@ export default class ImageControl extends React.Component (item as FileValue).value === obj.value))) { obj = { ...org, - ...obj + ...obj, + id: org.id || obj.id }; }