From 876be5f7dc8f2251caaa3e4471758c4ef934972f Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Sun, 5 Jun 2022 01:47:03 +0800 Subject: [PATCH 1/2] =?UTF-8?q?BI-106880=20=E8=A7=86=E8=A7=89=E5=A4=84?= =?UTF-8?q?=E7=90=86fineui=E6=8E=A5=E5=8F=A3=E6=8F=90=E4=BE=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/case/button/node/node.arrow.js | 4 +++- src/case/button/node/node.icon.arrow.js | 2 ++ src/case/checkbox/check.arrownode.js | 12 ++++++---- src/case/layer/panel.js | 7 +++--- src/widget/numberinterval/numberinterval.js | 26 ++++++++++----------- 5 files changed, 30 insertions(+), 21 deletions(-) diff --git a/src/case/button/node/node.arrow.js b/src/case/button/node/node.arrow.js index 8a313c72a..d0b21ca7c 100644 --- a/src/case/button/node/node.arrow.js +++ b/src/case/button/node/node.arrow.js @@ -17,7 +17,9 @@ BI.ArrowNode = BI.inherit(BI.NodeButton, { render: function () { var self = this, o = this.options; this.checkbox = BI.createWidget({ - type: "bi.arrow_group_node_checkbox" + type: "bi.arrow_group_node_checkbox", + expandIcon: o.expandIcon, + collapseIcon: o.collapseIcon, }); return { type: "bi.vertical_adapt", diff --git a/src/case/button/node/node.icon.arrow.js b/src/case/button/node/node.icon.arrow.js index 1cfa52925..d641e655d 100644 --- a/src/case/button/node/node.icon.arrow.js +++ b/src/case/button/node/node.icon.arrow.js @@ -29,6 +29,8 @@ BI.IconArrowNode = BI.inherit(BI.NodeButton, { var self = this, o = this.options; this.checkbox = BI.createWidget({ type: "bi.arrow_group_node_checkbox", + expandIcon: o.expandIcon, + collapseIcon: o.collapseIcon, width: 24, stopPropagation: true }); diff --git a/src/case/checkbox/check.arrownode.js b/src/case/checkbox/check.arrownode.js index 26447aca6..519ae1d45 100644 --- a/src/case/checkbox/check.arrownode.js +++ b/src/case/checkbox/check.arrownode.js @@ -4,17 +4,21 @@ */ BI.ArrowTreeGroupNodeCheckbox = BI.inherit(BI.IconButton, { _defaultConfig: function () { - return BI.extend(BI.ArrowTreeGroupNodeCheckbox.superclass._defaultConfig.apply(this, arguments), { - extraCls: "bi-arrow-group-node-checkbox expander-right-font" + var conf = BI.ArrowTreeGroupNodeCheckbox.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + extraCls: "bi-arrow-group-node-checkbox " + (conf.collapseIcon || "expander-right-font"), + expandIcon: "expander-down-font", + collapseIcon: "expander-right-font" }); }, setSelected: function (v) { + var o = this.options; BI.ArrowTreeGroupNodeCheckbox.superclass.setSelected.apply(this, arguments); if(v) { - this.element.removeClass("expander-right-font").addClass("expander-down-font"); + this.element.removeClass(o.collapseIcon).addClass(o.expandIcon); } else { - this.element.removeClass("expander-down-font").addClass("expander-right-font"); + this.element.removeClass(o.expandIcon).addClass(o.collapseIcon); } } }); diff --git a/src/case/layer/panel.js b/src/case/layer/panel.js index d24b7b546..949f8cbd5 100644 --- a/src/case/layer/panel.js +++ b/src/case/layer/panel.js @@ -8,6 +8,7 @@ BI.Panel = BI.inherit(BI.Widget, { return BI.extend(BI.Panel.superclass._defaultConfig.apply(this, arguments), { baseCls: "bi-panel bi-border", title: "", + titleHeight: 30, titleButtons: [], el: {}, logic: { @@ -34,7 +35,7 @@ BI.Panel = BI.inherit(BI.Widget, { type: "bi.label", cls: "panel-title-text", text: o.title, - height: 30 + height: o.titleHeight }); this.button_group = BI.createWidget({ @@ -58,7 +59,7 @@ BI.Panel = BI.inherit(BI.Widget, { el: { type: "bi.left_right_vertical_adapt", cls: "panel-title bi-header-background bi-border-bottom", - height: 29, + height: o.titleHeight - 1, items: { left: [this.text], right: [this.button_group] @@ -66,7 +67,7 @@ BI.Panel = BI.inherit(BI.Widget, { lhgap: 10, rhgap: 10 }, - height: 29 + height: o.titleHeight - 1 }; }, diff --git a/src/widget/numberinterval/numberinterval.js b/src/widget/numberinterval/numberinterval.js index 9e2df9825..93d2c33b7 100644 --- a/src/widget/numberinterval/numberinterval.js +++ b/src/widget/numberinterval/numberinterval.js @@ -36,7 +36,7 @@ BI.NumberInterval = BI.inherit(BI.Single, { BI.NumberInterval.superclass._init.apply(this, arguments); this.smallEditor = BI.createWidget({ type: "bi.number_interval_single_editor", - height: o.height - 2, + height: o.height - (o.simple ? 1 : 2), watermark: o.watermark, allowBlank: o.allowBlank, value: o.min, @@ -55,13 +55,13 @@ BI.NumberInterval = BI.inherit(BI.Single, { } return true; }, - cls: "number-interval-small-editor bi-border" + cls: "number-interval-small-editor " + (o.simple ? "bi-border-bottom" : "bi-border") }); this.smallTip = BI.createWidget({ type: "bi.label", text: o.numTip, - height: o.height - 2, + height: o.height - (o.simple ? 1 : 2), invisible: true }); BI.createWidget({ @@ -76,7 +76,7 @@ BI.NumberInterval = BI.inherit(BI.Single, { this.bigEditor = BI.createWidget({ type: "bi.number_interval_single_editor", - height: o.height - 2, + height: o.height - (o.simple ? 1 : 2), watermark: o.watermark, allowBlank: o.allowBlank, value: o.max, @@ -93,13 +93,13 @@ BI.NumberInterval = BI.inherit(BI.Single, { } return true; }, - cls: "number-interval-big-editor bi-border" + cls: "number-interval-big-editor" + (o.simple ? " bi-border-bottom" : " bi-border") }); this.bigTip = BI.createWidget({ type: "bi.label", text: o.numTip, - height: o.height - 2, + height: o.height - (o.simple ? 1 : 2), invisible: true }); BI.createWidget({ @@ -113,8 +113,8 @@ BI.NumberInterval = BI.inherit(BI.Single, { }); this.smallCombo = BI.createWidget({ type: "bi.icon_combo", - cls: "number-interval-small-combo bi-border-top bi-border-bottom bi-border-right", - height: o.height - 2, + cls: "number-interval-small-combo" + (o.simple ? "" : " bi-border-top bi-border-bottom bi-border-right"), + height: o.height - (o.simple ? 0 : 2), items: [{ text: "(" + BI.i18nText("BI-Less_Than") + ")", iconCls: "less-font", @@ -132,8 +132,8 @@ BI.NumberInterval = BI.inherit(BI.Single, { } this.bigCombo = BI.createWidget({ type: "bi.icon_combo", - cls: "number-interval-big-combo bi-border-top bi-border-bottom bi-border-left", - height: o.height - 2, + cls: "number-interval-big-combo" + (o.simple ? "" : " bi-border-top bi-border-bottom bi-border-left"), + height: o.height - (o.simple ? 0 : 2), items: [{ text: "(" + BI.i18nText("BI-Less_Than") + ")", iconCls: "less-font", @@ -152,9 +152,9 @@ BI.NumberInterval = BI.inherit(BI.Single, { this.label = BI.createWidget({ type: "bi.label", text: BI.i18nText("BI-Basic_Value"), - textHeight: o.height - c.border * 2, - width: c.width - c.border * 2, - height: o.height - c.border * 2, + textHeight: o.height - (o.simple ? 0 : c.border * 2), + width: c.width - (o.simple ? 0 : c.border * 2), + height: o.height - (o.simple ? 0 : c.border * 2), level: "warning", tipType: "warning" }); From 0a6b261efbb60f25bf32f1d69dc9dca0648b39fc Mon Sep 17 00:00:00 2001 From: data Date: Sun, 5 Jun 2022 16:05:53 +0800 Subject: [PATCH 2/2] auto upgrade version to 2.0.20220605160539 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 88a3af400..2818e8c76 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20220603194706", + "version": "2.0.20220605160539", "description": "fineui", "main": "dist/fineui.min.js", "types": "dist/lib/index.d.ts",