From 814d5b365190bc7d74d95d48859b150855b9cb07 Mon Sep 17 00:00:00 2001 From: igrowp <164761965@qq.com> Date: Thu, 3 Nov 2022 17:54:35 +0800 Subject: [PATCH] =?UTF-8?q?amis-saas-6892=20fix:=20=E9=95=BF=E6=96=87?= =?UTF-8?q?=E6=9C=AC=E4=B8=8B=E6=8B=89=E8=8F=9C=E5=8D=95hover=E7=A7=BB?= =?UTF-8?q?=E5=87=BA=E5=90=8E=E6=9C=AA=E6=B6=88=E5=A4=B1=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I89042270212884be77a79e63b7c74b2e3fe7c646 --- .../control/_textarea-formula-control.scss | 49 +++++++++++++------ 1 file changed, 35 insertions(+), 14 deletions(-) diff --git a/packages/amis-editor-core/scss/control/_textarea-formula-control.scss b/packages/amis-editor-core/scss/control/_textarea-formula-control.scss index 249da0ba6..ee7cac3f3 100644 --- a/packages/amis-editor-core/scss/control/_textarea-formula-control.scss +++ b/packages/amis-editor-core/scss/control/_textarea-formula-control.scss @@ -15,7 +15,6 @@ border-radius: var(--Form-input-borderRadius); background: var(--Form-input-bg); font-size: var(--Form-input-fontSize); - overflow-y: auto; &::placeholder { color: var(--Form-input-placeholderColor); } @@ -24,8 +23,42 @@ border-color: var(--Form-input-onHover-borderColor); } + .textarea-formula-menu { + display: absolute; + position: absolute; + bottom: px2rem(8px); + right: px2rem(8px); + + &-outer { + min-width: px2rem(60px); + margin: 0; + padding: 0; + list-style: none; + + > li { + cursor: pointer; + white-space: nowrap; + user-select: none; + color: var(--DropDown-menuItem-color); + padding: var(--DropDown-menuItem-paddingY) + var(--DropDown-menuItem-paddingX); + + > a { + color: inherit; + } + + &:hover { + color: var(--DropDown-menuItem-onHover-color); + background: var(--DropDown-menuItem-onHover-bg); + } + } + } + } + &-editor { height: 100%; + border-radius: var(--Form-input-borderRadius); + overflow: auto; & > .CodeMirror { height: 100%; padding-right: 24px; @@ -38,7 +71,7 @@ padding: 0 5px; border-radius: 3px; color: #fff; - margin: 0 1px; + margin: 0 1px 1px; background: var(--button-primary-default-bg-color); cursor: pointer; @@ -93,18 +126,6 @@ } } - &-dropdown { - position: absolute; - bottom: 8px; - right: 8px; - } - - &-menus { - min-width: 60px; - left: auto; - right: 4px; - } - &-fullscreen { position: absolute; top: 4px;