From 0e7be89aa3680a8ebed0e790d73244d995ff1e46 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 905240b2..efa03878 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 a5617eff..70d144e9 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 }; }