From 109bd2b5c2874202b8b6acf77aa0aef5ab800412 Mon Sep 17 00:00:00 2001 From: liaoxuezhi Date: Thu, 31 Oct 2019 15:38:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=20image=20focus=20=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E6=8F=90=E7=A4=BA=E5=8F=AF=E7=B2=98=E8=B4=B4=E5=9B=BE?= =?UTF-8?q?=E7=89=87=E7=9A=84=E6=A0=B7=E5=BC=8F=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scss/components/form/_image.scss | 25 ++++++++++++++++--------- src/renderers/Form/Image.tsx | 12 ++++++------ 2 files changed, 22 insertions(+), 15 deletions(-) diff --git a/scss/components/form/_image.scss b/scss/components/form/_image.scss index 97fa0861..5ea82828 100644 --- a/scss/components/form/_image.scss +++ b/scss/components/form/_image.scss @@ -40,16 +40,23 @@ } &-pasteTip { - display: block; + pointer-events: none; + left: 0; + top: 50%; + transform: translateY(-50%); position: absolute; - color: $text--muted-color; - font-size: 12px; - transform: scale(0.8); - transform-origin: 100% 100%; - right: 0; - bottom: 0; - padding: 2px 5px; - background: rgba(255, 255, 255, 0.8); + font-size: $Tooltip--attr-fontSize; + line-height: $Tooltip--attr-lineHeigt; + text-align: left; + white-space: nowrap; + background: $Tooltip--attr-bg; + border: $Tooltip--attr-borderWidth solid $Tooltip--attr-borderColor; + border-radius: $Tooltip--attr-borderRadius; + box-shadow: $Tooltip--attr-boxShadow; + left: 100%; + color: $Tooltip--attr-color; + padding: $Tooltip--attr-paddingY $Tooltip--attr-paddingX; + margin: 30px 0 0 $Tooltip--attr-gap; } &-dropzone:focus &-addBtn { diff --git a/src/renderers/Form/Image.tsx b/src/renderers/Form/Image.tsx index 273126c2..d94fdbf5 100644 --- a/src/renderers/Form/Image.tsx +++ b/src/renderers/Form/Image.tsx @@ -938,13 +938,13 @@ export default class ImageControl extends React.Component - - ) : null} - {isFocused ? ( - - 当前状态支持从剪切板中粘贴图片文件。 - + {isFocused ? ( + + 当前状态支持从剪切板中粘贴图片文件。 + + ) : null} + ) : null} {!autoUpload && !hideUploadButton && files.length ? (