From 1d585de8a87d5bd0cb5d051871c5b607e8ff7292 Mon Sep 17 00:00:00 2001 From: guy Date: Thu, 17 Feb 2022 16:45:59 +0800 Subject: [PATCH 01/18] =?UTF-8?q?feature:=20=E5=B8=83=E5=B1=80=E6=94=AF?= =?UTF-8?q?=E6=8C=81padding?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/wrapper/layout.js | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/core/wrapper/layout.js b/src/core/wrapper/layout.js index 92a836ddf..4c94198ff 100644 --- a/src/core/wrapper/layout.js +++ b/src/core/wrapper/layout.js @@ -55,6 +55,20 @@ BI.Layout = BI.inherit(BI.Widget, { if (this.options.right) { this.element.css("right", BI.isNumber(this.options.right) ? this.options.right / BI.pixRatio + BI.pixUnit : this.options.right); } + if (this.options.padding) { + if (this.options.padding.left) { + this.element.css("padding-left", BI.isNumber(this.options.padding.left) ? this.options.padding.left / BI.pixRatio + BI.pixUnit : this.options.padding.left); + } + if (this.options.padding.right) { + this.element.css("padding-right", BI.isNumber(this.options.padding.right) ? this.options.padding.right / BI.pixRatio + BI.pixUnit : this.options.padding.right); + } + if (this.options.padding.top) { + this.element.css("padding-top", BI.isNumber(this.options.padding.top) ? this.options.padding.top / BI.pixRatio + BI.pixUnit : this.options.padding.top); + } + if (this.options.padding.bottom) { + this.element.css("padding-bottom", BI.isNumber(this.options.padding.bottom) ? this.options.padding.bottom / BI.pixRatio + BI.pixUnit : this.options.padding.bottom); + } + } }, _init4Scroll: function () { @@ -272,8 +286,8 @@ BI.Layout = BI.inherit(BI.Widget, { "margin-top": "", "margin-bottom": "", "margin-left": "", - "margin-right": "", - }) + "margin-right": "" + }); }, _optimiseGap: function (gap) { From d9b3e5fd638e43f1170969825c572dc7c253439a Mon Sep 17 00:00:00 2001 From: data Date: Thu, 17 Feb 2022 17:03:54 +0800 Subject: [PATCH 02/18] auto upgrade version to 2.0.20220217170345 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0b2d61ff9..d859c3d5e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20220217101535", + "version": "2.0.20220217170345", "description": "fineui", "main": "dist/fineui.min.js", "types": "dist/lib/index.d.ts", From 8e0447be78b2ac44132a7ef7164f6229fbdcfdeb Mon Sep 17 00:00:00 2001 From: guy Date: Thu, 17 Feb 2022 17:10:27 +0800 Subject: [PATCH 03/18] =?UTF-8?q?bugfix:=20=E5=B0=8F=E4=B8=89=E8=A7=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/layer/layer.popup.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/base/layer/layer.popup.js b/src/base/layer/layer.popup.js index 509f011c9..549558d67 100644 --- a/src/base/layer/layer.popup.js +++ b/src/base/layer/layer.popup.js @@ -233,10 +233,10 @@ BI.PopupView = BI.inherit(BI.Widget, { right: BI.clamp(((middle ? popupWidth : position.width) + adjustXOffset) / 2 - 6, minRight, maxRight) }; wrapperStyle = { - bottom: o.bgap + o.vgap, + top: o.bgap + o.vgap, left: "", right: 0, - top: "", + bottom: "", }; placeholderStyle = { left: 0, From 04fe6cfd53a9b2774db044dea86b4080fd7cbc66 Mon Sep 17 00:00:00 2001 From: data Date: Thu, 17 Feb 2022 17:23:01 +0800 Subject: [PATCH 04/18] auto upgrade version to 2.0.20220217172251 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d859c3d5e..f49d226ce 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20220217170345", + "version": "2.0.20220217172251", "description": "fineui", "main": "dist/fineui.min.js", "types": "dist/lib/index.d.ts", From b13fd63687e5618648c8a4af5447ec744c3aae23 Mon Sep 17 00:00:00 2001 From: guy Date: Thu, 17 Feb 2022 19:45:52 +0800 Subject: [PATCH 05/18] =?UTF-8?q?feature:=20sticky=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/wrapper/sticky/sticky.horizontal.js | 38 ++++++++++++++++++++ src/core/wrapper/sticky/sticky.vertical.js | 38 ++++++++++++++++++++ 2 files changed, 76 insertions(+) create mode 100644 src/core/wrapper/sticky/sticky.horizontal.js create mode 100644 src/core/wrapper/sticky/sticky.vertical.js diff --git a/src/core/wrapper/sticky/sticky.horizontal.js b/src/core/wrapper/sticky/sticky.horizontal.js new file mode 100644 index 000000000..f178afd6b --- /dev/null +++ b/src/core/wrapper/sticky/sticky.horizontal.js @@ -0,0 +1,38 @@ +/** + * 横向黏性布局 + */ +BI.HorizontalStickyLayout = BI.inherit(BI.FlexHorizontalLayout, { + props: function () { + return BI.extend(BI.HorizontalStickyLayout.superclass.props.apply(this, arguments), { + extraCls: "bi-h-sticky", + horizontalAlign: BI.HorizontalAlign.Stretch, + verticalAlign: BI.VerticalAlign.Stretch + }); + }, + + _addElement: function (i, item) { + var o = this.options; + var w = BI.HorizontalStickyLayout.superclass._addElement.apply(this, arguments); + var columnSize = o.columnSize.length > 0 ? o.columnSize[i] : item.width >= 1 ? null : item.width; + if (o.columnSize.length > 0) { + if (item.width >= 1 && o.columnSize[i] >= 1 && o.columnSize[i] !== item.width) { + columnSize = null; + } + } + if (columnSize !== "fill") { + var firstItemFill = o.columnSize[0] === "fill" || o.items[0].width === "fill"; + w.element.css({ + position: "sticky", + zIndex: 1, + left: firstItemFill ? "" : 0, + right: firstItemFill ? 0 : "" + }); + } else { + w.element.css({ + overflow: "" + }); + } + return w; + } +}); +BI.shortcut("bi.horizontal_sticky", BI.HorizontalStickyLayout); diff --git a/src/core/wrapper/sticky/sticky.vertical.js b/src/core/wrapper/sticky/sticky.vertical.js new file mode 100644 index 000000000..d99b8828e --- /dev/null +++ b/src/core/wrapper/sticky/sticky.vertical.js @@ -0,0 +1,38 @@ +/** + * 纵向黏性布局 + */ +BI.VerticalStickyLayout = BI.inherit(BI.FlexVerticalLayout, { + props: function () { + return BI.extend(BI.VerticalStickyLayout.superclass.props.apply(this, arguments), { + extraCls: "bi-v-sticky", + horizontalAlign: BI.HorizontalAlign.Stretch, + verticalAlign: BI.VerticalAlign.Stretch + }); + }, + + _addElement: function (i, item) { + var o = this.options; + var w = BI.VerticalStickyLayout.superclass._addElement.apply(this, arguments); + var rowSize = o.rowSize.length > 0 ? o.rowSize[i] : item.height >= 1 ? null : item.height; + if (o.rowSize.length > 0) { + if (item.height >= 1 && o.rowSize[i] >= 1 && o.rowSize[i] !== item.height) { + rowSize = null; + } + } + if (rowSize !== "fill") { + var firstItemFill = o.rowSize[0] === "fill" || o.items[0].height === "fill"; + w.element.css({ + position: "sticky", + zIndex: 1, + top: firstItemFill ? "" : 0, + bottom: firstItemFill ? 0 : "" + }); + } else { + w.element.css({ + overflow: "" + }); + } + return w; + } +}); +BI.shortcut("bi.vertical_sticky", BI.VerticalStickyLayout); From 41b19904dd7b5fe6d1aa1eac8bf1ab90e26791f9 Mon Sep 17 00:00:00 2001 From: data Date: Thu, 17 Feb 2022 20:03:41 +0800 Subject: [PATCH 06/18] auto upgrade version to 2.0.20220217200332 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f49d226ce..3e4ce5900 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20220217172251", + "version": "2.0.20220217200332", "description": "fineui", "main": "dist/fineui.min.js", "types": "dist/lib/index.d.ts", From ba97797248b20c410b53a4205fb327bbe1952b2b Mon Sep 17 00:00:00 2001 From: guy Date: Thu, 17 Feb 2022 20:08:40 +0800 Subject: [PATCH 07/18] =?UTF-8?q?feature:=20sticky=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/wrapper/{ => layout}/sticky/sticky.horizontal.js | 0 src/core/wrapper/{ => layout}/sticky/sticky.vertical.js | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename src/core/wrapper/{ => layout}/sticky/sticky.horizontal.js (100%) rename src/core/wrapper/{ => layout}/sticky/sticky.vertical.js (100%) diff --git a/src/core/wrapper/sticky/sticky.horizontal.js b/src/core/wrapper/layout/sticky/sticky.horizontal.js similarity index 100% rename from src/core/wrapper/sticky/sticky.horizontal.js rename to src/core/wrapper/layout/sticky/sticky.horizontal.js diff --git a/src/core/wrapper/sticky/sticky.vertical.js b/src/core/wrapper/layout/sticky/sticky.vertical.js similarity index 100% rename from src/core/wrapper/sticky/sticky.vertical.js rename to src/core/wrapper/layout/sticky/sticky.vertical.js From 8fab7e065b9ae7ad7f2c574cb5f7bc700b5be9d6 Mon Sep 17 00:00:00 2001 From: data Date: Thu, 17 Feb 2022 20:22:33 +0800 Subject: [PATCH 08/18] auto upgrade version to 2.0.20220217202228 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3e4ce5900..3a8c317dd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20220217200332", + "version": "2.0.20220217202228", "description": "fineui", "main": "dist/fineui.min.js", "types": "dist/lib/index.d.ts", From 715181e8d30cfe29e1e665281d5db9c41e87ec4a Mon Sep 17 00:00:00 2001 From: guy Date: Thu, 17 Feb 2022 22:45:08 +0800 Subject: [PATCH 09/18] =?UTF-8?q?feature:=20sticky=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/platform/web/config.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/core/platform/web/config.js b/src/core/platform/web/config.js index 2aedd70c0..5770bcb3b 100644 --- a/src/core/platform/web/config.js +++ b/src/core/platform/web/config.js @@ -12,6 +12,19 @@ BI.prepares.push(function () { } return _isSupportFlex; }; + // 判断浏览器是否支持sticky 属性 + var isSupportSticky = (function () { + var vendorList = ["", "-webkit-", "-ms-", "-moz-", "-o-"], + vendorListLength = vendorList.length, + stickyElement = document.createElement("div"); + for (var i = 0; i < vendorListLength; i++) { + stickyElement.style.position = vendorList[i] + "sticky"; + if (stickyElement.style.position !== "") { + return true; + } + } + return false; + })(); BI.Plugin.configWidget("bi.horizontal", function (ob) { var supportFlex = isSupportFlex(); // // 在横向自适应场景下我们需要使用table的自适应撑出滚动条的特性(flex处理不了这种情况) @@ -150,6 +163,16 @@ BI.prepares.push(function () { }) }); }); + BI.Plugin.configWidget("bi.horizontal_sticky", function (ob) { + if (isSupportSticky) { + return BI.extend({}, ob, {type: "bi.horizontal_fill"}); + } + }); + BI.Plugin.configWidget("bi.vertical_sticky", function (ob) { + if (isSupportSticky) { + return BI.extend({}, ob, {type: "bi.vertical_fill"}); + } + }); BI.Plugin.configWidget("bi.left_right_vertical_adapt", function (ob) { if (isSupportFlex()) { From 760e7c0bc9a05d118a4fc56c20c5638e5db82529 Mon Sep 17 00:00:00 2001 From: guy Date: Thu, 17 Feb 2022 22:46:26 +0800 Subject: [PATCH 10/18] =?UTF-8?q?feature:=20sticky=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/platform/web/config.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/platform/web/config.js b/src/core/platform/web/config.js index 5770bcb3b..f54b1a3b3 100644 --- a/src/core/platform/web/config.js +++ b/src/core/platform/web/config.js @@ -164,12 +164,12 @@ BI.prepares.push(function () { }); }); BI.Plugin.configWidget("bi.horizontal_sticky", function (ob) { - if (isSupportSticky) { + if (!isSupportSticky) { return BI.extend({}, ob, {type: "bi.horizontal_fill"}); } }); BI.Plugin.configWidget("bi.vertical_sticky", function (ob) { - if (isSupportSticky) { + if (!isSupportSticky) { return BI.extend({}, ob, {type: "bi.vertical_fill"}); } }); From d76c5416238a6ea1a3e5575ddab20197b3004bb7 Mon Sep 17 00:00:00 2001 From: data Date: Thu, 17 Feb 2022 23:03:39 +0800 Subject: [PATCH 11/18] auto upgrade version to 2.0.20220217230329 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3a8c317dd..a727f140b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20220217202228", + "version": "2.0.20220217230329", "description": "fineui", "main": "dist/fineui.min.js", "types": "dist/lib/index.d.ts", From f2fcc6961521e3a4c1b61c1fdfa04c4f0455ad1d Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Fri, 18 Feb 2022 16:27:03 +0800 Subject: [PATCH 12/18] =?UTF-8?q?BI-101288=20fix:=20node=20type=E4=B8=8D?= =?UTF-8?q?=E5=85=81=E8=AE=B8=E8=87=AA=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/case/ztree/0.treeview.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/case/ztree/0.treeview.js b/src/case/ztree/0.treeview.js index aa0c502a4..7968c6c29 100644 --- a/src/case/ztree/0.treeview.js +++ b/src/case/ztree/0.treeview.js @@ -358,14 +358,15 @@ BI.TreeView = BI.inherit(BI.Pane, { n.title = n.text; } var text = BI.createWidget(BI.extend({ - type: "bi.text", cls: "tree-node-text", css: { display: "inline" }, whiteSpace: "nowrap", root: true - }, n)); + }, n, { + type: "bi.text" + })); var fragment = BI.Widget._renderEngine.createElement("
"); fragment.append(text.element[0]); n.text = fragment.html(); From 7632caa2cb85e4b82a021a37d4d826740d6bcddb Mon Sep 17 00:00:00 2001 From: data Date: Fri, 18 Feb 2022 16:43:07 +0800 Subject: [PATCH 13/18] auto upgrade version to 2.0.20220218164258 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a727f140b..36f8b61c3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20220217230329", + "version": "2.0.20220218164258", "description": "fineui", "main": "dist/fineui.min.js", "types": "dist/lib/index.d.ts", From 9bbd430e073804d7a27f0ee40bedf2ef6569a5b6 Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Fri, 18 Feb 2022 16:50:17 +0800 Subject: [PATCH 14/18] =?UTF-8?q?BI-101293=20fix:=20popover=E7=9A=84header?= =?UTF-8?q?=E4=B8=8D=E5=B1=85=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/layer/layer.popover.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/base/layer/layer.popover.js b/src/base/layer/layer.popover.js index 646758527..9109a9a4e 100644 --- a/src/base/layer/layer.popover.js +++ b/src/base/layer/layer.popover.js @@ -75,6 +75,8 @@ BI.Popover = BI.inherit(BI.Widget, { title: o.header, textAlign: "left" }, + top: 0, + bottom: 0, left: BI.SIZE_CONSANTS.H_GAP_SIZE, right: o.closable ? 0 : BI.SIZE_CONSANTS.H_GAP_SIZE }] From 0c60ad358e28e924f471e2bc5fc3205fedfc3e5c Mon Sep 17 00:00:00 2001 From: data Date: Fri, 18 Feb 2022 17:03:50 +0800 Subject: [PATCH 15/18] auto upgrade version to 2.0.20220218170340 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 36f8b61c3..a8295767b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20220218164258", + "version": "2.0.20220218170340", "description": "fineui", "main": "dist/fineui.min.js", "types": "dist/lib/index.d.ts", From 86673a107fbd6662a511df6f5f085ea846e50f3d Mon Sep 17 00:00:00 2001 From: "Cauchy.Ke" Date: Mon, 21 Feb 2022 16:20:14 +0800 Subject: [PATCH 16/18] =?UTF-8?q?DEC-22402=20fix:=E3=80=90=E5=86=92?= =?UTF-8?q?=E7=83=9F=E3=80=91=E4=B8=8B=E6=8B=89=E6=A0=91=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E7=BB=93=E6=9E=9C=E6=9C=AA=E6=A0=87=E9=BB=84=E5=85=B3=E9=94=AE?= =?UTF-8?q?=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/case/ztree/0.treeview.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/case/ztree/0.treeview.js b/src/case/ztree/0.treeview.js index 7968c6c29..e41fc893b 100644 --- a/src/case/ztree/0.treeview.js +++ b/src/case/ztree/0.treeview.js @@ -363,7 +363,8 @@ BI.TreeView = BI.inherit(BI.Pane, { display: "inline" }, whiteSpace: "nowrap", - root: true + root: true, + keyword: o.paras.keyword }, n, { type: "bi.text" })); From f0a6a2448e19bdf237895528567aaabe091bb385 Mon Sep 17 00:00:00 2001 From: guy Date: Mon, 21 Feb 2022 16:26:31 +0800 Subject: [PATCH 17/18] =?UTF-8?q?feature:=20=E6=94=AF=E6=8C=81warningTitle?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/case/ztree/0.treeview.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/case/ztree/0.treeview.js b/src/case/ztree/0.treeview.js index 7968c6c29..9f6695e2f 100644 --- a/src/case/ztree/0.treeview.js +++ b/src/case/ztree/0.treeview.js @@ -357,6 +357,9 @@ BI.TreeView = BI.inherit(BI.Pane, { if (BI.isNull(n.title)) { n.title = n.text; } + if (n.disabled) { + n.title = n.warningTitle || n.title; + } var text = BI.createWidget(BI.extend({ cls: "tree-node-text", css: { From 01bcc6fb73dee79b6f4b48adfeb2cda1cc23f32b Mon Sep 17 00:00:00 2001 From: data Date: Mon, 21 Feb 2022 16:53:16 +0800 Subject: [PATCH 18/18] auto upgrade version to 2.0.20220221165305 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a8295767b..68de4c38f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20220218170340", + "version": "2.0.20220221165305", "description": "fineui", "main": "dist/fineui.min.js", "types": "dist/lib/index.d.ts",