From 2897b1048ac7f1bbac6ebb9029657bfb48e68f44 Mon Sep 17 00:00:00 2001 From: guy Date: Sat, 22 Jan 2022 22:19:21 +0800 Subject: [PATCH 1/3] =?UTF-8?q?feature:=20switch=E5=AD=97=E4=BD=93?= =?UTF-8?q?=E5=A4=A7=E5=B0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/less/base/single/button/switch.less | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/less/base/single/button/switch.less b/src/less/base/single/button/switch.less index 9fbab0e73..22ba538c9 100644 --- a/src/less/base/single/button/switch.less +++ b/src/less/base/single/button/switch.less @@ -1,6 +1,7 @@ @import "../../../index"; -.bi-switch{ +.bi-switch { + font-size: @font-size-12; .border-radius(40px 40px 40px 40px); background-color: @color-bi-background-switch; .transition(all .2s); From a663284784e5366465cee968628d56c0dadeb287 Mon Sep 17 00:00:00 2001 From: guy Date: Sat, 22 Jan 2022 22:31:44 +0800 Subject: [PATCH 2/3] =?UTF-8?q?chore:=20=E6=95=B4=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../interactivearrangement.less | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 src/less/widget/interactivearrangement/interactivearrangement.less diff --git a/src/less/widget/interactivearrangement/interactivearrangement.less b/src/less/widget/interactivearrangement/interactivearrangement.less deleted file mode 100644 index c368c3b96..000000000 --- a/src/less/widget/interactivearrangement/interactivearrangement.less +++ /dev/null @@ -1,11 +0,0 @@ -@import "../../index"; - -.bi-interactive-arrangement { - & .interactive-arrangement-dragtag-line { - z-index: @zIndex-tip; - background-color: @color-bi-background-interactive-arrangement-dragtag-line; - } - & .interactive-arrangement-dragtag-icon { - z-index: @zIndex-tip; - } -} \ No newline at end of file From a5407abe8a4d3b5a6423393db5d202d3c53f3092 Mon Sep 17 00:00:00 2001 From: guy Date: Sun, 23 Jan 2022 12:57:53 +0800 Subject: [PATCH 3/3] =?UTF-8?q?chore:=20=E6=95=B4=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/combination/combo.js | 2 ++ src/base/layer/layer.popup.js | 18 ++++++++++-------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/base/combination/combo.js b/src/base/combination/combo.js index ed66ac0f7..de401bdd6 100644 --- a/src/base/combination/combo.js +++ b/src/base/combination/combo.js @@ -286,6 +286,8 @@ width: width, height: height, offsetStyle: o.offsetStyle, + adjustXOffset: o.adjustXOffset, + adjustYOffset: o.adjustYOffset, offset: this.combo.element.offset() }); if ("left" in p) { diff --git a/src/base/layer/layer.popup.js b/src/base/layer/layer.popup.js index 93bd91d3d..a0d8220f8 100644 --- a/src/base/layer/layer.popup.js +++ b/src/base/layer/layer.popup.js @@ -176,6 +176,8 @@ BI.PopupView = BI.inherit(BI.Widget, { setDirection: function (direction, position) { if (this.options.showArrow) { var style, placeholderStyle; + var adjustXOffset = position.adjustXOffset || 0; + var adjustYOffset = position.adjustYOffset || 0; var bodyBounds = BI.Widget._renderEngine.createElement("body").bounds(); var bodyWidth = bodyBounds.width; var bodyHeight = bodyBounds.height; @@ -200,7 +202,7 @@ BI.PopupView = BI.inherit(BI.Widget, { direction = "bottom"; style = { // 5表示留出一定的空间 - left: BI.clamp((middle ? popupWidth : position.width) / 2 - 6, minLeft, maxLeft) + left: BI.clamp(((middle ? popupWidth : position.width) - adjustXOffset) / 2 - 6, minLeft, maxLeft) }; placeholderStyle = { left: 0, @@ -213,7 +215,7 @@ BI.PopupView = BI.inherit(BI.Widget, { case "bottom,left": direction = "bottom"; style = { - right: BI.clamp((middle ? popupWidth : position.width) / 2 - 6, minRight, maxRight) + right: BI.clamp(((middle ? popupWidth : position.width) + adjustXOffset) / 2 - 6, minRight, maxRight) }; placeholderStyle = { left: 0, @@ -227,7 +229,7 @@ BI.PopupView = BI.inherit(BI.Widget, { case "top,right": direction = "top"; style = { - left: BI.clamp((middle ? popupWidth : position.width) / 2 - 6, minLeft, maxLeft) + left: BI.clamp(((middle ? popupWidth : position.width) - adjustXOffset) / 2 - 6, minLeft, maxLeft) }; placeholderStyle = { left: 0, @@ -240,7 +242,7 @@ BI.PopupView = BI.inherit(BI.Widget, { case "top,left": direction = "top"; style = { - right: BI.clamp((middle ? popupWidth : position.width) / 2 - 6, minRight, maxRight) + right: BI.clamp(((middle ? popupWidth : position.width) + adjustXOffset) / 2 - 6, minRight, maxRight) }; placeholderStyle = { left: 0, @@ -254,7 +256,7 @@ BI.PopupView = BI.inherit(BI.Widget, { case "left,bottom": direction = "left"; style = { - top: BI.clamp((middle ? popupHeight : position.height) / 2 - 6, minTop, maxTop) + top: BI.clamp(((middle ? popupHeight : position.height) - adjustYOffset) / 2 - 6, minTop, maxTop) }; placeholderStyle = { top: 0, @@ -267,7 +269,7 @@ BI.PopupView = BI.inherit(BI.Widget, { case "left,top": direction = "left"; style = { - bottom: BI.clamp((middle ? popupHeight : position.height) / 2 - 6, minBottom, maxBottom) + bottom: BI.clamp(((middle ? popupHeight : position.height) + adjustYOffset) / 2 - 6, minBottom, maxBottom) }; placeholderStyle = { top: 0, @@ -281,7 +283,7 @@ BI.PopupView = BI.inherit(BI.Widget, { case "right,bottom": direction = "right"; style = { - top: BI.clamp((middle ? popupHeight : position.height) / 2 - 6, minTop, maxTop) + top: BI.clamp(((middle ? popupHeight : position.height) - adjustYOffset) / 2 - 6, minTop, maxTop) }; placeholderStyle = { top: 0, @@ -294,7 +296,7 @@ BI.PopupView = BI.inherit(BI.Widget, { case "right,top": direction = "right"; style = { - bottom: BI.clamp((middle ? popupHeight : position.height) / 2 - 6, minBottom, maxBottom) + bottom: BI.clamp(((middle ? popupHeight : position.height) + adjustYOffset) / 2 - 6, minBottom, maxBottom) }; placeholderStyle = { top: 0,