From f81feff31ec48681c71a3248134359e1ec68b654 Mon Sep 17 00:00:00 2001 From: windy Date: Tue, 18 Oct 2022 17:08:03 +0800 Subject: [PATCH 01/56] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1=20?= =?UTF-8?q?=E5=8D=95=E9=80=89=E4=B8=8B=E6=8B=89=E5=80=BC0=E9=80=89?= =?UTF-8?q?=E4=B8=ADtrigger=E4=B8=8D=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/widget/singleselect/trigger/searcher.singleselect.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widget/singleselect/trigger/searcher.singleselect.js b/src/widget/singleselect/trigger/searcher.singleselect.js index a5674b8f1..3ba7c78e4 100644 --- a/src/widget/singleselect/trigger/searcher.singleselect.js +++ b/src/widget/singleselect/trigger/searcher.singleselect.js @@ -128,7 +128,7 @@ BI.SingleSelectSearcher = BI.inherit(BI.Widget, { if (BI.isUndefined(v)) { this.editor.setState(BI.Selection.None); } else { - v = v || ""; + v = BI.isNull(v) ? "" : v; this.editor.setState(o.valueFormatter(v + "") || (v + "")); } }, From 94fc4e6e5d8f7b9d2efa17a80fe68d32df0dd608 Mon Sep 17 00:00:00 2001 From: zsmj Date: Mon, 24 Oct 2022 11:36:55 +0800 Subject: [PATCH 02/56] =?UTF-8?q?KERNEL-13199=20feat:=20sticky=E5=B8=83?= =?UTF-8?q?=E5=B1=80=E6=94=AF=E6=8C=81=E5=90=8C=E6=97=B6=E5=90=B8=E9=A1=B6?= =?UTF-8?q?=E5=92=8C=E5=90=B8=E5=BA=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../layout/sticky/sticky.horizontal.js | 28 +++++++++++++++---- .../wrapper/layout/sticky/sticky.vertical.js | 28 +++++++++++++++---- 2 files changed, 44 insertions(+), 12 deletions(-) diff --git a/src/core/wrapper/layout/sticky/sticky.horizontal.js b/src/core/wrapper/layout/sticky/sticky.horizontal.js index a59dd6edf..afdf955aa 100644 --- a/src/core/wrapper/layout/sticky/sticky.horizontal.js +++ b/src/core/wrapper/layout/sticky/sticky.horizontal.js @@ -21,13 +21,29 @@ BI.HorizontalStickyLayout = BI.inherit(BI.FlexHorizontalLayout, { } } 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 : "" + var fillIndex; + BI.count(0, o.items.length - 1, index => { + if (BI.isNotNull(fillIndex)) { + return; + } + if ((o.columnSize[index] === "fill" || o.items[index].width === "fill")) { + fillIndex = index; + } }); + + if (fillIndex > i) { + w.element.css({ + position: "sticky", + zIndex: 1, + left: 0, + }); + } else { + w.element.css({ + position: "sticky", + zIndex: 1, + right: 0 + }); + } } else { w.element.css({ overflow: "" diff --git a/src/core/wrapper/layout/sticky/sticky.vertical.js b/src/core/wrapper/layout/sticky/sticky.vertical.js index 970d84eef..beb0e9d43 100644 --- a/src/core/wrapper/layout/sticky/sticky.vertical.js +++ b/src/core/wrapper/layout/sticky/sticky.vertical.js @@ -21,13 +21,29 @@ BI.VerticalStickyLayout = BI.inherit(BI.FlexVerticalLayout, { } } 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 : "" + var fillIndex; + BI.count(0, o.items.length - 1, index => { + if (BI.isNotNull(fillIndex)) { + return; + } + if ((o.rowSize[index] === "fill" || o.items[index].height === "fill")) { + fillIndex = index; + } }); + + if (fillIndex > i) { + w.element.css({ + position: "sticky", + zIndex: 1, + top: 0, + }); + } else { + w.element.css({ + position: "sticky", + zIndex: 1, + bottom: 0 + }); + } } else { w.element.css({ overflow: "" From 1a9de516c6be2b5f2c4829d4b7607058ee840218 Mon Sep 17 00:00:00 2001 From: zsmj Date: Mon, 24 Oct 2022 11:47:45 +0800 Subject: [PATCH 03/56] =?UTF-8?q?=E6=97=A0JIRA=20fix:=20hover=E8=BE=B9?= =?UTF-8?q?=E6=A1=86=E9=AB=98=E4=BA=AE=E6=95=88=E6=9E=9C,=E5=9C=A8?= =?UTF-8?q?=E7=88=B6=E8=8A=82=E7=82=B9disabled=E7=9A=84=E5=9C=BA=E6=99=AF?= =?UTF-8?q?=E4=B8=8B,=E6=B2=A1=E5=BF=85=E8=A6=81=E9=AB=98=E4=BA=AE?= =?UTF-8?q?=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/less/core/utils/common.less | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/src/less/core/utils/common.less b/src/less/core/utils/common.less index d4b0d3bcd..7e0d85ff0 100644 --- a/src/less/core/utils/common.less +++ b/src/less/core/utils/common.less @@ -74,9 +74,10 @@ border-color: @color-bi-border-highlight; } // ie下不支持focus-within, 和上面写在一起会导致ie下:hover不生效 - &:focus-within{ + &:focus-within { border-color: @color-bi-border-highlight; } + &.disabled { &:hover { border-color: @border-color-line; @@ -84,6 +85,14 @@ } } +.base-disabled { + .bi-focus-shadow { + &:hover { + border-color: @border-color-line; + } + } +} + .bi-theme-dark { .bi-focus-shadow { &.disabled { @@ -94,6 +103,16 @@ } } +.bi-theme-dark { + .base-disabled { + .bi-focus-shadow { + &:hover { + border-color: @border-color-line-theme-dark; + } + } + } +} + .clearfix { .clearfix(); } @@ -102,6 +121,7 @@ .bi-background { background-color: @color-bi-background-normal; color: @color-bi-text-background; + & .bi-input { color: @color-bi-text-background; } From bcdcb32ba854a6cf2519903560fe4a56869a92cd Mon Sep 17 00:00:00 2001 From: zsmj Date: Mon, 24 Oct 2022 16:44:11 +0800 Subject: [PATCH 04/56] =?UTF-8?q?=E6=97=A0JIRA=20fix:=20checkbox=E7=9A=84?= =?UTF-8?q?=E8=87=AA=E9=80=82=E5=BA=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/less/base/single/input/checkbox.less | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/less/base/single/input/checkbox.less b/src/less/base/single/input/checkbox.less index 7141d75a9..9b1d66917 100644 --- a/src/less/base/single/input/checkbox.less +++ b/src/less/base/single/input/checkbox.less @@ -9,17 +9,16 @@ &:after { position: absolute; display: table; - // 百分比会出现像素误差 - top: 6px; - left: 2px; + top: 45%; + left: 20%; border: 2px solid transparent; border-top: 0; border-left: 0; - width: 6px; - height: 9px; + width: 50%; + height: 75%; .box-sizing(border-box); .transform(rotate(45deg) scale(1) translate(-50%, -50%)); - @transition: all .1s cubic-bezier(.71,-.46,.88,.6),opacity .1s; + @transition: all .1s cubic-bezier(.71, -.46, .88, .6), opacity .1s; .transition(@transition); content: ''; } From 17a71ef95aeaa2a9079bba7e4168e49ce528d90e Mon Sep 17 00:00:00 2001 From: data Date: Mon, 24 Oct 2022 17:04:48 +0800 Subject: [PATCH 05/56] auto upgrade version to 2.0.20221024170442 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e499e4361..0f143848b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221024153423", + "version": "2.0.20221024170442", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From 0a1f19347f41e92d5168769dc7f46e68fabfc6f7 Mon Sep 17 00:00:00 2001 From: zsmj Date: Tue, 25 Oct 2022 10:31:16 +0800 Subject: [PATCH 06/56] =?UTF-8?q?KERNEL-13158=20feat:=20radio=E5=92=8C?= =?UTF-8?q?=E5=8D=8A=E9=80=89=E5=9B=BE=E6=A0=87=E6=94=AF=E6=8C=81=E7=AD=89?= =?UTF-8?q?=E6=AF=94=E7=BC=A9=E6=94=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/less/base/single/button/button.half.less | 9 +++++---- src/less/base/single/input/radio.less | 13 +++++++------ 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/less/base/single/button/button.half.less b/src/less/base/single/button/button.half.less index b652328fb..13bb7f996 100644 --- a/src/less/base/single/button/button.half.less +++ b/src/less/base/single/button/button.half.less @@ -6,10 +6,11 @@ &:after { position: absolute; - left: 2px; - top: 2px; - width: 8px; - height: 8px; + left: 50%; + top: 50%; + width: 50%; + height: 50%; + .transform(translate(-50%, -50%)); background-color: @color-bi-background-half-button-content; content: ''; } diff --git a/src/less/base/single/input/radio.less b/src/less/base/single/input/radio.less index 0a3345e42..a1aaa4071 100644 --- a/src/less/base/single/input/radio.less +++ b/src/less/base/single/input/radio.less @@ -2,13 +2,15 @@ .bi-radio { & .radio-content, &.radio-content { - .border-radius(8px); + .border-radius(50%); border: 1px solid @color-bi-border-radio; .box-sizing(border-box); .transition(all .1s); + &:after { content: ""; } + &.hover, &:hover { border-color: @color-bi-border-hover-active-radio; } @@ -18,16 +20,15 @@ border-color: @color-bi-border-hover-active-radio; background-color: @color-bi-background-active-radio; &:after { - width: 8px; - height: 8px; - display: table; + width: 50%; + height: 50%; position: absolute; top: 50%; left: 50%; - .border-radius(4px); + .border-radius(50%); background-color: @color-bi-background-active-radio-content; .transform(translate(-50%, -50%)); - @transition: all .1s cubic-bezier(.71,-.46,.88,.6),opacity .1s; + @transition: all .1s cubic-bezier(.71, -.46, .88, .6), opacity .1s; .transition(@transition); } } From ee17c83ac273f69ace1be1beff621422f61d5975 Mon Sep 17 00:00:00 2001 From: zsmj Date: Tue, 25 Oct 2022 14:03:39 +0800 Subject: [PATCH 07/56] =?UTF-8?q?KERNEL-13158=20feat:=20=E4=B8=8B=E6=8B=89?= =?UTF-8?q?=E6=A0=91=E5=92=8C=E5=88=97=E8=A1=A8=E6=A0=91=E7=AD=89=E6=AF=94?= =?UTF-8?q?=E7=BC=A9=E6=94=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/less/base/tree/ztree.less | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/src/less/base/tree/ztree.less b/src/less/base/tree/ztree.less index 1eb5896a6..97d0e4cbb 100644 --- a/src/less/base/tree/ztree.less +++ b/src/less/base/tree/ztree.less @@ -1,5 +1,10 @@ @import "../../index.less"; +.use-scale(@property, @pix) { + @{property} : @pix; //不支持css变量的浏览器 + @{property} : calc(var(--css-scale, 1) * @pix); +} + .ztree * { padding: 0; margin: 0; @@ -50,7 +55,7 @@ &:before { border-left: 1px solid @border-color-dark-gray-line; height: 100%; - left: 14px; + .use-scale(left, 14px); margin-top: 0; } } @@ -113,7 +118,8 @@ } .ztree.solid li a { - height: 30px; + //height: 30px; + .use-scale(height, 30px); } .ztree li a.curSelectedNode { @@ -163,7 +169,8 @@ } .ztree.solid li span { - line-height: 30px; + //line-height: 30px; + .use-scale(line-height, 30px); } .ztree li span.icon { @@ -218,8 +225,8 @@ .ztree li span.button.chk { position: relative; - width: 14px; - height: 14px; + .use-scale(width, 14px); + .use-scale(height, 14px); margin: 0 3px 0 0; cursor: auto } @@ -302,8 +309,10 @@ } .ztree.solid li span.button.switch { - width: 30px; - height: 30px + .use-scale(width, 30px); + .use-scale(height, 30px); + //width: 30px; + //height: 30px; } .ztree li span.button.switch.noline_open { From d5534e29ab97cf7c0698d4f088a6879e495e5858 Mon Sep 17 00:00:00 2001 From: data Date: Tue, 25 Oct 2022 14:24:28 +0800 Subject: [PATCH 08/56] auto upgrade version to 2.0.20221025142421 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0f143848b..f3c643a64 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221024170442", + "version": "2.0.20221025142421", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From 072e36b20e72aae0ef3d5d7e416998db4ee703e5 Mon Sep 17 00:00:00 2001 From: zsmj Date: Tue, 25 Oct 2022 14:43:59 +0800 Subject: [PATCH 09/56] =?UTF-8?q?=E6=97=A0JIRA=20=E5=88=A0=E6=8E=89?= =?UTF-8?q?=E6=97=A0=E7=94=A8less?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/less/base/tree/ztree.less | 187 +--------------------------------- 1 file changed, 1 insertion(+), 186 deletions(-) diff --git a/src/less/base/tree/ztree.less b/src/less/base/tree/ztree.less index 97d0e4cbb..341ab05f5 100644 --- a/src/less/base/tree/ztree.less +++ b/src/less/base/tree/ztree.less @@ -32,7 +32,7 @@ .ztree.solid li ul { margin: 0; - padding: 0 0 0 24px + .use-scale(padding-left, 24px); } // 此处不用2倍图,改用css画虚线 @@ -122,34 +122,6 @@ .use-scale(height, 30px); } -.ztree li a.curSelectedNode { -} - -.ztree li a.curSelectedNode_Edit { - padding-top: 0px; - background-color: #FFE6B0; - color: black; - height: 16px; - border: 1px #FFB951 solid; - opacity: 0.8; -} - -.ztree li a.tmpTargetNode_inner { - padding-top: 0px; - background-color: #316AC5; - color: white; - height: 16px; - border: 1px #316AC5 solid; - opacity: 0.8; - filter: alpha(opacity=80) -} - -.ztree li a.tmpTargetNode_prev { -} - -.ztree li a.tmpTargetNode_next { -} - .ztree li a input.rename { height: 14px; width: 80px; @@ -190,10 +162,6 @@ vertical-align: middle; border: 0 none; cursor: pointer; - outline: none; - background-color: transparent; - background-repeat: no-repeat; - background-attachment: scroll; } .ztree li span.button.chk { @@ -231,50 +199,6 @@ cursor: auto } -.ztree li span.button.chk.checkbox_false_disable { - background-position: 0 -56px -} - -.ztree li span.button.chk.checkbox_true_disable { - background-position: -14px -56px -} - -.ztree li span.button.chk.radio_false_full { - background-position: -28px 0 -} - -.ztree li span.button.chk.radio_false_full_focus { - background-position: -28px -14px -} - -.ztree li span.button.chk.radio_false_part { - background-position: -28px -28px -} - -.ztree li span.button.chk.radio_false_part_focus { - background-position: -28px -42px -} - -.ztree li span.button.chk.radio_false_disable { - background-position: -28px -56px -} - -.ztree li span.button.chk.radio_true_full { - background-position: -42px 0 -} - -.ztree li span.button.chk.radio_true_full_focus { - background-position: -42px -14px; -} - -.ztree li span.button.chk.radio_true_part { - background-position: -42px -28px -} - -.ztree li span.button.chk.radio_true_part_focus { - background-position: -42px -42px -} - .ztree li span.button.chk.checkbox_true_full { & + a { color: @color-bi-text-highlight; @@ -299,10 +223,6 @@ } } -.ztree li span.button.chk.radio_true_disable { - background-position: -42px -56px -} - .ztree li span.button.switch { width: 24px; height: 24px @@ -315,113 +235,8 @@ //height: 30px; } -.ztree li span.button.switch.noline_open { - width: 0; -} - -.ztree li span.button.switch.noline_close { - width: 0; -} - -.ztree li span.button.noline_open { - background-position: -92px -72px -} - -.ztree li span.button.noline_close { - background-position: -74px -72px -} - -.ztree li span.button.root_docu { - background: none; -} - -.ztree li span.button.noline_docu { - background: none; - width: 0; -} - -.ztree li span.button.ico_open { - margin-right: 2px; - background-position: -110px -16px; - vertical-align: top; -} - -.ztree li span.button.ico_close { - margin-right: 2px; - background-position: -110px 0; - vertical-align: top; -} - -.ztree li span.button.ico_docu { - margin-right: 2px; - background-position: -110px -32px; - vertical-align: top; -} - -.ztree li span.button.edit { - margin-right: 2px; - background-position: -110px -48px; - vertical-align: top; -} - -.ztree li span.button.remove { - margin-right: 2px; - background-position: -110px -64px; - vertical-align: top; -} - .ztree li span.button.ico_loading { width: 0px; margin-right: 2px; vertical-align: top; } - -ul.tmpTargetzTree { - background-color: #FFE6B0; - opacity: 0.8; - filter: alpha(opacity=80) -} - -span.tmpzTreeMove_arrow { - width: 16px; - height: 16px; - display: inline-block; - padding: 0; - margin: 2px 0 0 1px; - border: 0 none; - position: absolute; - background-color: transparent; - background-repeat: no-repeat; - background-attachment: scroll; - background-position: -110px -80px; -} - -ul.ztree.zTreeDragUL { - margin: 0; - padding: 0; - position: absolute; - width: auto; - height: auto; - overflow: hidden; - background-color: #cfcfcf; - border: 1px #00B83F dotted; - opacity: 0.8; - filter: alpha(opacity=80) -} - -.zTreeMask { - z-index: 10000; - background-color: #cfcfcf; - opacity: 0.0; - filter: alpha(opacity=0); - position: absolute -} - -/* level style*/ -/*.ztree li span.button.level0 { - display:none; -} -.ztree li ul.level0 { - padding:0; - background:none; -}*/ From 2eb1f1cd7ca5ed2dd6a148340dd8a3612b3182f5 Mon Sep 17 00:00:00 2001 From: guy Date: Tue, 25 Oct 2022 15:15:53 +0800 Subject: [PATCH 10/56] =?UTF-8?q?KERNEL-13158:=20=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E8=A1=8C=E4=B8=BA=E5=BA=94=E8=AF=A5=E5=8F=AF=E4=BB=A5=E6=94=BE?= =?UTF-8?q?=E6=8E=89=EF=BC=8C=20=E5=8F=AA=E8=A6=81=E6=8B=96=E6=8B=BD?= =?UTF-8?q?=E7=9A=84=E5=85=83=E7=B4=A0=E6=9C=AC=E8=BA=AB=E4=B8=8D=E6=98=AF?= =?UTF-8?q?=E4=B8=AA=E6=8C=89=E9=92=AE=E5=95=A5=E7=9A=84=E5=B0=B1=E6=B2=A1?= =?UTF-8?q?=E5=95=A5=E9=97=AE=E9=A2=98=EF=BC=8C=E4=B8=80=E8=88=AC=E4=B9=9F?= =?UTF-8?q?=E4=B8=8D=E4=BC=9A=E8=BF=99=E4=B9=88=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/utils/events/mousemovetracker.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/utils/events/mousemovetracker.js b/src/core/utils/events/mousemovetracker.js index 5bdac5f02..212072ebc 100644 --- a/src/core/utils/events/mousemovetracker.js +++ b/src/core/utils/events/mousemovetracker.js @@ -44,7 +44,7 @@ this._x = event.clientX; this._y = event.clientY; } - event.preventDefault ? event.preventDefault() : (event.returnValue = false); + // event.preventDefault ? event.preventDefault() : (event.returnValue = false); }, releaseMouseMoves: function () { @@ -104,4 +104,4 @@ this._onMoveEnd(); } }; -})(); \ No newline at end of file +})(); From 1dc589873d73645dde99c6b25a8b3228c1f489f9 Mon Sep 17 00:00:00 2001 From: data Date: Tue, 25 Oct 2022 15:24:26 +0800 Subject: [PATCH 11/56] auto upgrade version to 2.0.20221025152411 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f3c643a64..23f06ed89 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221025142421", + "version": "2.0.20221025152411", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From fe5478e4844f3725927e2dd6729bac077d91524b Mon Sep 17 00:00:00 2001 From: zsmj Date: Tue, 25 Oct 2022 17:25:46 +0800 Subject: [PATCH 12/56] =?UTF-8?q?KERNEL-13232=20feat:=20=E5=A4=8D=E9=80=89?= =?UTF-8?q?=E6=A0=91=E7=9A=84=E8=BF=9E=E6=8E=A5=E7=BA=BF=E4=B9=8B=E7=B1=BB?= =?UTF-8?q?=E7=9A=84=E4=B8=8D=E5=86=8D=E7=94=A8=E5=9B=BE=E7=89=87=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/less/base/tree/ztree.less | 24 ++++++++++++++ src/less/resource/background.less | 52 ++++++++++++++++++------------- 2 files changed, 54 insertions(+), 22 deletions(-) diff --git a/src/less/base/tree/ztree.less b/src/less/base/tree/ztree.less index 341ab05f5..f24569bbf 100644 --- a/src/less/base/tree/ztree.less +++ b/src/less/base/tree/ztree.less @@ -190,6 +190,30 @@ } } +.ztree.solid li span.button.bottom_docu { + background: none; + position: relative; + + &:before { + position: absolute; + top: 0; + left: -1px; + width: 50%; + height: 50%; + border-right: 1px solid @border-color-dark-gray-line; + content: ''; + } + + &:after { + position: absolute; + top: 0; + right: 1px; + height: 50%; + width: 50%; + border-bottom: 1px solid @border-color-dark-gray-line; + content: ''; + } +} .ztree li span.button.chk { position: relative; diff --git a/src/less/resource/background.less b/src/less/resource/background.less index 8aca40b17..999255654 100644 --- a/src/less/resource/background.less +++ b/src/less/resource/background.less @@ -43,6 +43,7 @@ .ztree li span.button.root_open { .image2xPath(@icon-tree-expand-type1-theme-dark); } + .ztree.solid li span.button.root_open { .image2xPath(@icon-tree-solid-expand-type1-theme-dark); } @@ -60,6 +61,7 @@ .ztree li span.button.root_close { .image2xPath(@icon-tree-collapse-type1-theme-dark); } + .ztree.solid li span.button.root_close { .image2xPath(@icon-tree-solid-collapse-type1-theme-dark); } @@ -70,15 +72,16 @@ } .ztree.solid li span.button.roots_open { - .image2xPath(@icon-tree-solid-expand-type2); + .image2xPath(@icon-tree-solid-expand-type1); } .bi-theme-dark { .ztree li span.button.roots_open { .image2xPath(@icon-tree-expand-type2-theme-dark); } + .ztree.solid li span.button.roots_open { - .image2xPath(@icon-tree-solid-expand-type2-theme-dark); + .image2xPath(@icon-tree-solid-expand-type1-theme-dark); } } @@ -87,15 +90,16 @@ } .ztree.solid li span.button.roots_close { - .image2xPath(@icon-tree-solid-collapse-type2); + .image2xPath(@icon-tree-solid-collapse-type1); } .bi-theme-dark { .ztree li span.button.roots_close { .image2xPath(@icon-tree-collapse-type2-theme-dark); } + .ztree.solid li span.button.roots_close { - .image2xPath(@icon-tree-solid-collapse-type2-theme-dark); + .image2xPath(@icon-tree-solid-collapse-type1-theme-dark); } } @@ -104,15 +108,16 @@ } .ztree.solid li span.button.center_open { - .image2xPath(@icon-tree-solid-expand-type3); + .image2xPath(@icon-tree-solid-expand-type1); } .bi-theme-dark { .ztree li span.button.center_open { .image2xPath(@icon-tree-expand-type3-theme-dark); } + .ztree.solid li span.button.center_open { - .image2xPath(@icon-tree-solid-expand-type3-theme-dark); + .image2xPath(@icon-tree-solid-expand-type1-theme-dark); } } @@ -121,15 +126,16 @@ } .ztree.solid li span.button.center_close { - .image2xPath(@icon-tree-solid-collapse-type3); + .image2xPath(@icon-tree-solid-collapse-type1); } .bi-theme-dark { .ztree li span.button.center_close { .image2xPath(@icon-tree-collapse-type3-theme-dark); } + .ztree.solid li span.button.center_close { - .image2xPath(@icon-tree-solid-collapse-type3-theme-dark); + .image2xPath(@icon-tree-solid-collapse-type1-theme-dark); } } @@ -138,15 +144,16 @@ } .ztree.solid li span.button.bottom_open { - .image2xPath(@icon-tree-solid-expand-type4); + .image2xPath(@icon-tree-solid-expand-type1); } .bi-theme-dark { .ztree li span.button.bottom_open { .image2xPath(@icon-tree-expand-type4-theme-dark); } + .ztree.solid li span.button.bottom_open { - .image2xPath(@icon-tree-solid-expand-type4-theme-dark); + .image2xPath(@icon-tree-solid-expand-type1-theme-dark); } } @@ -155,15 +162,16 @@ } .ztree.solid li span.button.bottom_close { - .image2xPath(@icon-tree-solid-collapse-type4); + .image2xPath(@icon-tree-solid-collapse-type1); } .bi-theme-dark { .ztree li span.button.bottom_close { .image2xPath(@icon-tree-collapse-type4-theme-dark); } + .ztree.solid li span.button.bottom_close { - .image2xPath(@icon-tree-solid-collapse-type4-theme-dark); + .image2xPath(@icon-tree-solid-collapse-type1-theme-dark); } } @@ -179,6 +187,7 @@ .ztree li span.button.roots_docu { .image2xPath(@icon-tree-vertical-line-2-theme-dark); } + .ztree.solid li span.button.roots_docu { .image2xPath(@icon-tree-solid-vertical-line-2-theme-dark); } @@ -196,6 +205,7 @@ .ztree li span.button.center_docu { .image2xPath(@icon-tree-vertical-line-3-theme-dark); } + .ztree.solid li span.button.center_docu { .image2xPath(@icon-tree-solid-vertical-line-3-theme-dark); } @@ -205,14 +215,12 @@ .image2xPath(@icon-tree-vertical-line-4); } -.ztree.solid li span.button.bottom_docu { - .image2xPath(@icon-tree-solid-vertical-line-4); -} .bi-theme-dark { .ztree li span.button.bottom_docu { .image2xPath(@icon-tree-vertical-line-4-theme-dark); } + .ztree.solid li span.button.bottom_docu { .image2xPath(@icon-tree-solid-vertical-line-4-theme-dark); } @@ -335,43 +343,43 @@ } .auto-color-background { - &.hack{ + &.hack { .imagePath(@background-auto-color); } } .auto-color-normal-background { - &.hack{ + &.hack { .imagePath(@background-auto-color-normal); } } .auto-color-normal-disabled-background { - &.hack{ + &.hack { .imagePath(@background-auto-color-disabled); } } .auto-color-square-normal-background { - &.hack{ + &.hack { .imagePath(@background-auto-color-square-normal); } } .auto-color-no-square-normal-background { - &.hack{ + &.hack { .imagePath(@background-auto-color-no-square-normal); } } .trans-color-background { - &.hack{ + &.hack { .imagePath(@background-trans-color); } } .trans-color-disabled-background { - &.hack{ + &.hack { .imagePath(@background-trans-color-disabled); } } From ee824ad8d528af7f462ed6500cfac7d34d09b41e Mon Sep 17 00:00:00 2001 From: zsmj Date: Tue, 25 Oct 2022 17:26:12 +0800 Subject: [PATCH 13/56] =?UTF-8?q?=E6=97=A0jira=20fix:=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?BI.isWidthOrHeight?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/2.base.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/2.base.js b/src/core/2.base.js index cc00f828c..61d9487cc 100644 --- a/src/core/2.base.js +++ b/src/core/2.base.js @@ -486,7 +486,7 @@ if (typeof w === "number") { return w >= 0; } else if (typeof w === "string") { - return /^\d{1,3}(\.\d)?%$/.test(w) || w === "auto" || /^\d+px$/.test(w) || /^calc/.test(w); + return /^\d{1,3}(\.\d)?%$/.test(w) || w === "auto" || /^\d+(\.\d+)px$/.test(w) || /^calc/.test(w); } }, From c181c9864d292a95a654d52b801427bba741dd96 Mon Sep 17 00:00:00 2001 From: zsmj Date: Tue, 25 Oct 2022 17:27:15 +0800 Subject: [PATCH 14/56] =?UTF-8?q?=E6=97=A0jira=20fix:=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?BI.isWidthOrHeight?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/2.base.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/2.base.js b/src/core/2.base.js index 61d9487cc..d7007de52 100644 --- a/src/core/2.base.js +++ b/src/core/2.base.js @@ -486,7 +486,7 @@ if (typeof w === "number") { return w >= 0; } else if (typeof w === "string") { - return /^\d{1,3}(\.\d)?%$/.test(w) || w === "auto" || /^\d+(\.\d+)px$/.test(w) || /^calc/.test(w); + return /^\d{1,3}(\.\d)?%$/.test(w) || w === "auto" || /^\d+(\.\d+)?px$/.test(w) || /^calc/.test(w); } }, From 7a880b43468d38101f9ccd5e1af321a5d36883b5 Mon Sep 17 00:00:00 2001 From: data Date: Tue, 25 Oct 2022 17:54:41 +0800 Subject: [PATCH 15/56] auto upgrade version to 2.0.20221025175433 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 23f06ed89..be12c8a0e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221025152411", + "version": "2.0.20221025175433", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From 70f6e9a07c873003f64bc526759ee97cad928120 Mon Sep 17 00:00:00 2001 From: zsmj Date: Wed, 26 Oct 2022 11:39:47 +0800 Subject: [PATCH 16/56] =?UTF-8?q?KERNEL-13193=20style:=20=E8=B0=83?= =?UTF-8?q?=E4=B8=80=E4=B8=8Bchecobox=E7=9A=84=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/less/base/single/button/button.half.less | 6 ++++-- src/less/base/single/input/checkbox.less | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/less/base/single/button/button.half.less b/src/less/base/single/button/button.half.less index 13bb7f996..c39b9d033 100644 --- a/src/less/base/single/button/button.half.less +++ b/src/less/base/single/button/button.half.less @@ -6,10 +6,12 @@ &:after { position: absolute; + .border-radius(2px); + display: table; left: 50%; top: 50%; - width: 50%; - height: 50%; + width: 70%; + height: 70%; .transform(translate(-50%, -50%)); background-color: @color-bi-background-half-button-content; content: ''; diff --git a/src/less/base/single/input/checkbox.less b/src/less/base/single/input/checkbox.less index 9b1d66917..012e38336 100644 --- a/src/less/base/single/input/checkbox.less +++ b/src/less/base/single/input/checkbox.less @@ -3,15 +3,17 @@ .bi-checkbox { & .checkbox-content, &.checkbox-content { .border-radius(2px); - border: 1px solid @color-bi-border-checkbox; + border: 2px solid @color-bi-border-checkbox; .box-sizing(border-box); .transition(all .1s); + &:after { position: absolute; display: table; top: 45%; left: 20%; border: 2px solid transparent; + border: calc(var(--css-scale, 1) * 2px) solid transparent; border-top: 0; border-left: 0; width: 50%; From cd0ce2d02abbb2c8f9abaf9cbbcb58e90aa03733 Mon Sep 17 00:00:00 2001 From: guy Date: Wed, 26 Oct 2022 11:46:25 +0800 Subject: [PATCH 17/56] =?UTF-8?q?KERNEL-13158:=20=E4=BC=98=E5=8C=96button?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/single/button/button.basic.js | 31 +++++++++++++++----------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/src/base/single/button/button.basic.js b/src/base/single/button/button.basic.js index 77bfd1036..64865de8b 100644 --- a/src/base/single/button/button.basic.js +++ b/src/base/single/button/button.basic.js @@ -184,7 +184,7 @@ BI.BasicButton = BI.inherit(BI.Single, { var mouseDown = false; var interval; hand.mousedown(function (e) { - BI.Widget._renderEngine.createElement(document).bind("mouseup." + self.getName(), function (e) { + BI.Widget._renderEngine.createElement(document).bind("mouseup." + self.getName(), function () { interval && clearInterval(interval); interval = null; mouseDown = false; @@ -193,13 +193,14 @@ BI.BasicButton = BI.inherit(BI.Single, { if (mouseDown === true) { return; } - if (!self.isEnabled() || (self.isOnce() && self.isSelected())) { + if (!self.isEnabled() || !self.isValid()) { + return; + } + if (self.isOnce() && self.isSelected()) { return; } interval = setInterval(function () { - if (self.isEnabled()) { - self.doClick(); - } + clk(e) }, 180); mouseDown = true; ev(e); @@ -239,7 +240,10 @@ BI.BasicButton = BI.inherit(BI.Single, { function clk(e) { ev(e); - if (!self.isEnabled() || (self.isOnce() && self.isSelected())) { + if (!self.isEnabled() || !self.isValid()) { + return; + } + if (self.isOnce() && self.isSelected()) { return; } if (BI.isKey(o.bubble) || BI.isFunction(o.bubble)) { @@ -335,16 +339,17 @@ BI.BasicButton = BI.inherit(BI.Single, { }, _doClick: function (e) { - if (this.isValid()) { - var isIntercepted = this.beforeClick(e); - // 如果事件已经被消费掉了,就不再触发点击事件 - if (isIntercepted) { - return; - } + if (!this.isEnabled() || !this.isValid()) { + return; + } + var isIntercepted = this.beforeClick(e); + // 如果事件已经被消费掉了,就不再触发点击事件 + if (isIntercepted) { + return; } this._trigger(e); - if (this.isValid()) { + if (this.isEnabled() && this.isValid()) { this.doClick(e); } }, From 02b37dc07b0351e167c3a12d9983406d4375ffab Mon Sep 17 00:00:00 2001 From: zsmj Date: Wed, 26 Oct 2022 14:25:29 +0800 Subject: [PATCH 18/56] =?UTF-8?q?KERNEL-13193=20style:=20=E8=B0=83?= =?UTF-8?q?=E4=B8=80=E4=B8=8Bchecobox=E7=9A=84=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/less/base/single/input/checkbox.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/less/base/single/input/checkbox.less b/src/less/base/single/input/checkbox.less index 012e38336..155c14441 100644 --- a/src/less/base/single/input/checkbox.less +++ b/src/less/base/single/input/checkbox.less @@ -3,7 +3,7 @@ .bi-checkbox { & .checkbox-content, &.checkbox-content { .border-radius(2px); - border: 2px solid @color-bi-border-checkbox; + border: 1px solid @color-bi-border-checkbox; .box-sizing(border-box); .transition(all .1s); From 3d222ea4162984fe88842c1c7bb6f5f01cd015c7 Mon Sep 17 00:00:00 2001 From: zsmj Date: Wed, 26 Oct 2022 14:29:45 +0800 Subject: [PATCH 19/56] =?UTF-8?q?KERNEL-13193=20style:=20=E8=B0=83?= =?UTF-8?q?=E4=B8=80=E4=B8=8Bchecobox=E7=9A=84=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/less/base/single/input/checkbox.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/less/base/single/input/checkbox.less b/src/less/base/single/input/checkbox.less index 155c14441..50156c323 100644 --- a/src/less/base/single/input/checkbox.less +++ b/src/less/base/single/input/checkbox.less @@ -11,7 +11,7 @@ position: absolute; display: table; top: 45%; - left: 20%; + left: 18%; border: 2px solid transparent; border: calc(var(--css-scale, 1) * 2px) solid transparent; border-top: 0; From de85e1affe2b86688252443290e811f7d3a5912d Mon Sep 17 00:00:00 2001 From: data Date: Wed, 26 Oct 2022 15:15:07 +0800 Subject: [PATCH 20/56] auto upgrade version to 2.0.20221026151459 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index be12c8a0e..d383baf9d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221025175433", + "version": "2.0.20221026151459", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From 128c819e8392bca5cd3c6f9eb0795a24395eac8f Mon Sep 17 00:00:00 2001 From: zsmj Date: Wed, 26 Oct 2022 15:49:50 +0800 Subject: [PATCH 21/56] =?UTF-8?q?BI-116019=20fix:=20=E3=80=906.0.4?= =?UTF-8?q?=E5=86=92=E7=83=9F=E3=80=91=E5=8C=BA=E9=97=B4=E6=BB=91=E5=9D=97?= =?UTF-8?q?=E4=B8=8D=E7=BB=91=E5=AE=9A=E5=AD=97=E6=AE=B5=EF=BC=8C=E9=BC=A0?= =?UTF-8?q?=E6=A0=87=E6=82=AC=E6=B5=AE=E7=BB=84=E4=BB=B6=E5=BA=94=E8=AF=A5?= =?UTF-8?q?=E4=BC=9A=E6=9C=89=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- demo/js/config/widget.js | 4 ++-- src/widget/intervalslider/intervalslider.js | 19 ++++++++++--------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/demo/js/config/widget.js b/demo/js/config/widget.js index d2e1b1d5b..e48282492 100644 --- a/demo/js/config/widget.js +++ b/demo/js/config/widget.js @@ -192,7 +192,7 @@ Demo.WIDGET_CONFIG = [{ value: "demo.number_interval" }, { id: 420, - text: "滚动sliders", + text: "数值滑块sliders", value: "demo.slider" }, { pId: 4, @@ -202,4 +202,4 @@ Demo.WIDGET_CONFIG = [{ pId: 414, text: "bi.collapse", value: "demo.collapse" -}]; \ No newline at end of file +}]; diff --git a/src/widget/intervalslider/intervalslider.js b/src/widget/intervalslider/intervalslider.js index 71351dd71..59b1e1676 100644 --- a/src/widget/intervalslider/intervalslider.js +++ b/src/widget/intervalslider/intervalslider.js @@ -26,7 +26,7 @@ BI.IntervalSlider = BI.inherit(BI.Single, { beforeMount: function () { const { value, min, max } = this.options; - this.setMinAndMax({ + this._setMinAndMax({ min, max, }); @@ -260,12 +260,12 @@ BI.IntervalSlider = BI.inherit(BI.Single, { items: [ { el: this.sliderOne, - top: 1, + top: 0, bottom: 0, left: 0 }, { el: this.sliderTwo, - top: 1, + top: 0, bottom: 0, left: "100%" } @@ -487,22 +487,23 @@ BI.IntervalSlider = BI.inherit(BI.Single, { }, - setMinAndMax: function (v) { + _setMinAndMax: function (v) { var minNumber = BI.parseFloat(v.min); var maxNumber = BI.parseFloat(v.max); - if ((!isNaN(minNumber)) && (!isNaN(maxNumber)) && (maxNumber >= minNumber )) { + if ((!isNaN(minNumber)) && (!isNaN(maxNumber)) && (maxNumber >= minNumber)) { this.min = minNumber; this.max = maxNumber; this.valueOne = minNumber; this.valueTwo = maxNumber; this.precision = this._getPrecision(); - this.setEnable(true); - } - if (maxNumber === minNumber) { - this.setEnable(false); } }, + setMinAndMax: function (v) { + this._setMinAndMax(v); + this.setEnable(v.min <= v.max); + }, + setValue: function (v) { var o = this.options; var valueOne = BI.parseFloat(v.min); From 87ce0200b0b8c3787e06607cdece16dbf91bcfdd Mon Sep 17 00:00:00 2001 From: "Xavier.Meng" Date: Wed, 26 Oct 2022 15:44:26 +0800 Subject: [PATCH 22/56] =?UTF-8?q?=E6=97=A0JIRA=20refactor(widget/year):=20?= =?UTF-8?q?ts=E5=A3=B0=E6=98=8E=E8=A1=A5=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- typescript/index.ts | 3 +++ typescript/widget/year/combo.year.ts | 2 ++ typescript/widget/year/popup.year.ts | 13 +++++++++++++ 3 files changed, 18 insertions(+) create mode 100644 typescript/widget/year/popup.year.ts diff --git a/typescript/index.ts b/typescript/index.ts index 3aaca1ead..a1b9831c9 100644 --- a/typescript/index.ts +++ b/typescript/index.ts @@ -145,6 +145,7 @@ import { ArrowTreeGroupNodeCheckbox } from "./case/checkbox/check.arrownode"; import { NumberInterval } from "./widget/numberinterval/numberinterval"; import { DynamicYearQuarterCombo } from "./widget/yearquarter/combo.yearquarter"; import { DynamicYearCombo } from "./widget/year/combo.year"; +import { DynamicYearPopup } from "./widget/year/popup.year"; import { IntervalSlider } from "./widget/intervalslider/intervalslider"; import { MultiSelectInsertList } from "./widget/multiselectlist/multiselectlist.insert"; import { YearMonthInterval } from "./widget/yearmonthinterval/yearmonthinterval"; @@ -350,6 +351,7 @@ export interface BI extends _func, _i18n, _base, _inject, _var, _web, _utils { NumberInterval: typeof NumberInterval; DynamicYearQuarterCombo: typeof DynamicYearQuarterCombo; DynamicYearCombo: typeof DynamicYearCombo; + DynamicYearPopup: typeof DynamicYearPopup; IntervalSlider: typeof IntervalSlider; MultiSelectInsertList: typeof MultiSelectInsertList; YearMonthInterval: typeof YearMonthInterval; @@ -546,6 +548,7 @@ export { NumberInterval, DynamicYearQuarterCombo, DynamicYearCombo, + DynamicYearPopup, IntervalSlider, MultiSelectInsertList, YearMonthInterval, diff --git a/typescript/widget/year/combo.year.ts b/typescript/widget/year/combo.year.ts index 809dc6c69..2bc7394f1 100644 --- a/typescript/widget/year/combo.year.ts +++ b/typescript/widget/year/combo.year.ts @@ -2,6 +2,8 @@ import { Widget } from "../../core/widget"; export declare class DynamicYearCombo extends Widget { static xtype: string; + static Static: 1; + static Dynamic: 2; static EVENT_CONFIRM: string; static EVENT_BEFORE_POPUPVIEW: string; diff --git a/typescript/widget/year/popup.year.ts b/typescript/widget/year/popup.year.ts new file mode 100644 index 000000000..16d61dc22 --- /dev/null +++ b/typescript/widget/year/popup.year.ts @@ -0,0 +1,13 @@ +import { Widget } from '../../core/widget'; + +export declare class DynamicYearPopup extends Widget { + static xtype: string; + static BUTTON_CLEAR_EVENT_CHANGE: string; + static BUTTON_lABEL_EVENT_CHANGE: string; + static BUTTON_OK_EVENT_CHANGE: string; + static EVENT_CHANGE: string; + + setMinDate(minDate?: string): void; + + setMaxDate(maxDate?: string): void; +} From 9377b4e02b84daf7e0b6b7bf23227a696075fade Mon Sep 17 00:00:00 2001 From: zsmj Date: Wed, 26 Oct 2022 18:41:25 +0800 Subject: [PATCH 23/56] =?UTF-8?q?=20KERNEL-13232=20feat:=20=E5=A4=8D?= =?UTF-8?q?=E9=80=89=E6=A0=91=E7=9A=84=E8=BF=9E=E6=8E=A5=E7=BA=BF=E4=B9=8B?= =?UTF-8?q?=E7=B1=BB=E7=9A=84=E4=B8=8D=E5=86=8D=E7=94=A8=E5=9B=BE=E7=89=87?= =?UTF-8?q?=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/less/base/tree/ztree.less | 63 +++++++++++++++++++++++++++++++ src/less/case/tree/tree.item.less | 25 +++++++++++- src/less/resource/background.less | 20 ---------- 3 files changed, 87 insertions(+), 21 deletions(-) diff --git a/src/less/base/tree/ztree.less b/src/less/base/tree/ztree.less index f24569bbf..a75904add 100644 --- a/src/less/base/tree/ztree.less +++ b/src/less/base/tree/ztree.less @@ -190,6 +190,56 @@ } } +.ztree.solid li span.button.roots_docu { + background: none; + position: relative; + + &:before { + position: absolute; + bottom: 0; + left: -1px; + width: 50%; + height: 50%; + border-right: 1px solid @border-color-dark-gray-line; + content: ''; + } + + &:after { + position: absolute; + top: 0; + right: 0; + height: 50%; + width: 50%; + border-bottom: 1px solid @border-color-dark-gray-line; + content: ''; + } +} + +.ztree.solid li span.button.center_docu { + background: none; + position: relative; + + &:before { + position: absolute; + top: 0; + left: -1px; + width: 50%; + height: 100%; + border-right: 1px solid @border-color-dark-gray-line; + content: ''; + } + + &:after { + position: absolute; + top: 0; + right: 0; + height: 50%; + width: 50%; + border-bottom: 1px solid @border-color-dark-gray-line; + content: ''; + } +} + .ztree.solid li span.button.bottom_docu { background: none; position: relative; @@ -215,6 +265,19 @@ } } +.bi-theme-dark { + .ztree.solid li span.button.center_docu, .ztree.solid li span.button.bottom_docu { + &:before { + border-right: 1px solid @border-color-dark-gray-line-theme-dark; + } + + &:after { + border-bottom: 1px solid @border-color-dark-gray-line-theme-dark; + } + } +} + + .ztree li span.button.chk { position: relative; .use-scale(width, 14px); diff --git a/src/less/case/tree/tree.item.less b/src/less/case/tree/tree.item.less index 3098f664a..2d2d7a9bc 100644 --- a/src/less/case/tree/tree.item.less +++ b/src/less/case/tree/tree.item.less @@ -1,6 +1,29 @@ @import "../../index.less"; -.tree-first-solid-line-conn-background, .tree-mid-solid-line-conn-background { +.tree-first-solid-line-conn-background { + &:before { + position: absolute; + bottom: 0; + left: -1px; + width: 50%; + height: 50%; + border-right: 1px solid @border-color-dark-gray-line; + content: ''; + } + + &:after { + position: absolute; + top: 0; + right: 0; + height: 50%; + width: 50%; + border-bottom: 1px solid @border-color-dark-gray-line; + content: ''; + } +} + + +.tree-mid-solid-line-conn-background { &:before { position: absolute; top: 0; diff --git a/src/less/resource/background.less b/src/less/resource/background.less index 999255654..c204e1653 100644 --- a/src/less/resource/background.less +++ b/src/less/resource/background.less @@ -179,36 +179,20 @@ .image2xPath(@icon-tree-vertical-line-2); } -.ztree.solid li span.button.roots_docu { - .image2xPath(@icon-tree-solid-vertical-line-2); -} - .bi-theme-dark { .ztree li span.button.roots_docu { .image2xPath(@icon-tree-vertical-line-2-theme-dark); } - - .ztree.solid li span.button.roots_docu { - .image2xPath(@icon-tree-solid-vertical-line-2-theme-dark); - } } .ztree li span.button.center_docu { .image2xPath(@icon-tree-vertical-line-3); } -.ztree.solid li span.button.center_docu { - .image2xPath(@icon-tree-solid-vertical-line-3); -} - .bi-theme-dark { .ztree li span.button.center_docu { .image2xPath(@icon-tree-vertical-line-3-theme-dark); } - - .ztree.solid li span.button.center_docu { - .image2xPath(@icon-tree-solid-vertical-line-3-theme-dark); - } } .ztree li span.button.bottom_docu { @@ -220,10 +204,6 @@ .ztree li span.button.bottom_docu { .image2xPath(@icon-tree-vertical-line-4-theme-dark); } - - .ztree.solid li span.button.bottom_docu { - .image2xPath(@icon-tree-solid-vertical-line-4-theme-dark); - } } .ztree li span.button.ico_loading { From 940e1e4cb77dc8476e2d7691af45b7e0e689c120 Mon Sep 17 00:00:00 2001 From: data Date: Thu, 27 Oct 2022 09:55:24 +0800 Subject: [PATCH 24/56] auto upgrade version to 2.0.20221027095512 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d383baf9d..8a40e7e57 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221026151459", + "version": "2.0.20221027095512", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From 115d0ccff1ce668e5402432d0780a8bc6c15953d Mon Sep 17 00:00:00 2001 From: data Date: Thu, 27 Oct 2022 12:16:46 +0800 Subject: [PATCH 25/56] auto upgrade version to 2.0.20221027121605 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8a40e7e57..3e177505b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221027095512", + "version": "2.0.20221027121605", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From 5945138658019db198ee7a1c7e930e5515788dd1 Mon Sep 17 00:00:00 2001 From: "Xavier.Meng" Date: Thu, 27 Oct 2022 13:48:31 +0800 Subject: [PATCH 26/56] =?UTF-8?q?=E6=97=A0JIRA=20refactor(=E6=97=A5?= =?UTF-8?q?=E6=9C=9F=E6=8E=A7=E4=BB=B6):=20=E4=BF=AE=E6=94=B9ts=E5=A3=B0?= =?UTF-8?q?=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- typescript/widget/datepane/datepane.ts | 4 ++-- typescript/widget/dynamicdate/dynamicdate.combo.ts | 4 ++-- typescript/widget/dynamicdatetime/dynamicdatetime.combo.ts | 4 ++-- typescript/widget/year/combo.year.ts | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/typescript/widget/datepane/datepane.ts b/typescript/widget/datepane/datepane.ts index 6e3212bfc..3e62cf149 100644 --- a/typescript/widget/datepane/datepane.ts +++ b/typescript/widget/datepane/datepane.ts @@ -4,8 +4,8 @@ export declare class DynamicDatePane extends Widget { static xtype: string; static EVENT_CHANGE: string; static EVENT_BEFORE_YEAR_MONTH_POPUPVIEW: string; - static Static: 1; - static Dynamic: 2; + static Static: number; + static Dynamic: number; setMinDate(minDate: string): void; diff --git a/typescript/widget/dynamicdate/dynamicdate.combo.ts b/typescript/widget/dynamicdate/dynamicdate.combo.ts index 00921782f..305a71c4f 100644 --- a/typescript/widget/dynamicdate/dynamicdate.combo.ts +++ b/typescript/widget/dynamicdate/dynamicdate.combo.ts @@ -2,8 +2,8 @@ import { Single } from '../../base/single/single'; export declare class DynamicDateCombo extends Single { static xtype: string; - static Static: 1; - static Dynamic: 2; + static Static: number; + static Dynamic: number; static EVENT_KEY_DOWN: string; static EVENT_CONFIRM: string; diff --git a/typescript/widget/dynamicdatetime/dynamicdatetime.combo.ts b/typescript/widget/dynamicdatetime/dynamicdatetime.combo.ts index b4122ead8..268372758 100644 --- a/typescript/widget/dynamicdatetime/dynamicdatetime.combo.ts +++ b/typescript/widget/dynamicdatetime/dynamicdatetime.combo.ts @@ -11,8 +11,8 @@ export declare class DynamicDateTimeCombo extends Single { static EVENT_ERROR: string; static EVENT_BEFORE_POPUPVIEW: string; static EVENT_BEFORE_YEAR_MONTH_POPUPVIEW: string; - static Static: 1; - static Dynamic: 2; + static Static: number; + static Dynamic: number; props: { minDate?: string; maxDate?: string; diff --git a/typescript/widget/year/combo.year.ts b/typescript/widget/year/combo.year.ts index 2bc7394f1..605f1700d 100644 --- a/typescript/widget/year/combo.year.ts +++ b/typescript/widget/year/combo.year.ts @@ -2,8 +2,8 @@ import { Widget } from "../../core/widget"; export declare class DynamicYearCombo extends Widget { static xtype: string; - static Static: 1; - static Dynamic: 2; + static Static: number; + static Dynamic: number; static EVENT_CONFIRM: string; static EVENT_BEFORE_POPUPVIEW: string; From c28a89f40d8aa9bc9235d97f1a2f63583ebc177f Mon Sep 17 00:00:00 2001 From: data Date: Thu, 27 Oct 2022 14:24:51 +0800 Subject: [PATCH 27/56] auto upgrade version to 2.0.20221027142438 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3e177505b..f08a3b639 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221027121605", + "version": "2.0.20221027142438", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From e9813d5f97f700579d3cf3f5cd15ed96ffb4d88b Mon Sep 17 00:00:00 2001 From: zsmj Date: Thu, 27 Oct 2022 14:49:46 +0800 Subject: [PATCH 28/56] =?UTF-8?q?=E6=97=A0jira=20fix:=20less=E4=B8=AD=20.h?= =?UTF-8?q?over-visible=20mixin=E4=B9=9F=E5=A4=84=E7=90=86=E4=B8=80?= =?UTF-8?q?=E4=B8=8Bcombo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/less/visual.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/less/visual.less b/src/less/visual.less index 8e227fb8f..3c7601937 100644 --- a/src/less/visual.less +++ b/src/less/visual.less @@ -339,7 +339,7 @@ } .hover-visible(@cls) { - & .@{cls} { + & .@{cls}:not(.bi-combo-popup) { visibility: hidden; } &:hover { From 65b610d2d67d6746a499291753487c72a3d44aa1 Mon Sep 17 00:00:00 2001 From: data Date: Thu, 27 Oct 2022 15:24:45 +0800 Subject: [PATCH 29/56] auto upgrade version to 2.0.20221027152436 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f08a3b639..f321aad08 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221027142438", + "version": "2.0.20221027152436", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From cae15031747af4bb7be9ad657eb1f7cc8d891068 Mon Sep 17 00:00:00 2001 From: guy Date: Thu, 27 Oct 2022 15:30:42 +0800 Subject: [PATCH 30/56] =?UTF-8?q?KERNEL-13158:=20=E5=8C=85=E8=A3=B9BI.Widg?= =?UTF-8?q?et.pushContext()?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/combination/group.button.js | 12 +++++++----- src/base/combination/navigation.js | 19 +++++++++---------- src/base/combination/tab.js | 17 +++++++++-------- src/core/4.widget.js | 11 +++++++++++ 4 files changed, 36 insertions(+), 23 deletions(-) diff --git a/src/base/combination/group.button.js b/src/base/combination/group.button.js index 184a6d146..02b044b17 100644 --- a/src/base/combination/group.button.js +++ b/src/base/combination/group.button.js @@ -42,11 +42,13 @@ BI.ButtonGroup = BI.inherit(BI.Widget, { }, _createBtns: function (items) { - BI.Widget.pushContext(this); - var btns = BI.createWidgets(BI.createItems(items, { - type: "bi.text_button", - })); - BI.Widget.popContext(); + var btns; + BI.Widget.execWithContext(this, function () { + btns = BI.createWidgets(BI.createItems(items, { + type: "bi.text_button", + })); + }); + return btns; }, diff --git a/src/base/combination/navigation.js b/src/base/combination/navigation.js index adc3e5ad4..1b347298e 100644 --- a/src/base/combination/navigation.js +++ b/src/base/combination/navigation.js @@ -43,11 +43,10 @@ BI.Navigation = BI.inherit(BI.Widget, { return self.showIndex + v; }, cardCreator: function (v) { - BI.Widget.pushContext(self); - var card = o.cardCreator(v); - BI.Widget.popContext(); - self.cardMap[v] = card; - return card; + BI.Widget.execWithContext(self, function () { + self.cardMap[v] = o.cardCreator(v); + }); + return self.cardMap[v]; }, afterCardCreated: BI.bind(this.afterCardCreated, this), afterCardShow: BI.bind(this.afterCardShow, this), @@ -104,12 +103,12 @@ BI.Navigation = BI.inherit(BI.Widget, { }, _assertCard: function (v) { + var self = this, o = this.options; if (!this.layout.isCardExisted(v)) { - BI.Widget.pushContext(this); - var card = this.options.cardCreator(v); - BI.Widget.popContext(); - this.cardMap[v] = card; - this.layout.addCardByName(v, card); + BI.Widget.execWithContext(self, function () { + self.cardMap[v] = o.cardCreator(v); + }); + this.layout.addCardByName(v, this.cardMap[v]); this.afterCardCreated(v); } }, diff --git a/src/base/combination/tab.js b/src/base/combination/tab.js index 85fca3483..9fe862884 100644 --- a/src/base/combination/tab.js +++ b/src/base/combination/tab.js @@ -43,10 +43,11 @@ BI.Tab = BI.inherit(BI.Widget, { eventObj: this.tab, cardLayout: this.layout, cardCreator: function (v) { - var card = o.cardCreator.apply(self, arguments); - self.cardMap[v] = card; + BI.Widget.execWithContext(self, function () { + self.cardMap[v] = o.cardCreator.apply(self, arguments); + }); - return card; + return self.cardMap[v]; }, afterCardShow: function (v) { self._deleteOtherCards(v); @@ -71,12 +72,12 @@ BI.Tab = BI.inherit(BI.Widget, { }, _assertCard: function (v) { + var self = this, o = this.options; if (!this.layout.isCardExisted(v)) { - BI.Widget.pushContext(this); - var card = this.options.cardCreator(v); - BI.Widget.popContext(); - this.cardMap[v] = card; - this.layout.addCardByName(v, card); + BI.Widget.execWithContext(this, function () { + self.cardMap[v] = o.cardCreator.apply(self, arguments); + }); + this.layout.addCardByName(v, this.cardMap[v]); } }, diff --git a/src/core/4.widget.js b/src/core/4.widget.js index ab85900ff..ce3747adc 100644 --- a/src/core/4.widget.js +++ b/src/core/4.widget.js @@ -857,6 +857,17 @@ BI.Widget.context = context = contextStack.pop(); }; + BI.Widget.execWithContext = function (context, execFunc) { + BI.Widget.pushContext(context); + try { + execFunc(); + } catch (e) { + throw e; + } finally { + BI.Widget.popContext(); + } + }; + function pushTarget(_current) { if (current) currentStack.push(current); BI.Widget.current = current = _current; From 3e440e09fb18aec0f703a3dfa51a0c5b4323fe63 Mon Sep 17 00:00:00 2001 From: guy Date: Thu, 27 Oct 2022 15:35:23 +0800 Subject: [PATCH 31/56] =?UTF-8?q?KERNEL-13158:=20=E5=8C=85=E8=A3=B9BI.Widg?= =?UTF-8?q?et.pushContext()?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/4.widget.js | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/core/4.widget.js b/src/core/4.widget.js index ce3747adc..3adf1f5f4 100644 --- a/src/core/4.widget.js +++ b/src/core/4.widget.js @@ -938,16 +938,6 @@ return vm; }; - BI.execWithContext = function (_context, fn) { - BI.Widget.pushContext(_context); - try { - fn(); - } catch (e) { - // nothing - } - BI.Widget.popContext(); - }; - BI.watch = function (vm, watch, handler) { // 必须要保证组件当前环境存在 if (BI.Widget.current) { From 2154234a0825ebc15604b0f83a8464de8e01d853 Mon Sep 17 00:00:00 2001 From: data Date: Thu, 27 Oct 2022 16:06:29 +0800 Subject: [PATCH 32/56] auto upgrade version to 2.0.20221027160615 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f321aad08..b86f38463 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221027152436", + "version": "2.0.20221027160615", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From accde7ee707d0ee1b8ed1bf3f4125a94a2b83005 Mon Sep 17 00:00:00 2001 From: windy Date: Thu, 27 Oct 2022 17:15:11 +0800 Subject: [PATCH 33/56] =?UTF-8?q?BI-116192=20=E5=8A=A8=E6=80=81=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E4=B8=8D=E5=8F=AF=E8=A7=81=E7=8A=B6=E6=80=81=E4=B8=8B?= =?UTF-8?q?resize=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/platform/web/detectElementResize.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/platform/web/detectElementResize.js b/src/core/platform/web/detectElementResize.js index 357e938a7..3183a57c4 100644 --- a/src/core/platform/web/detectElementResize.js +++ b/src/core/platform/web/detectElementResize.js @@ -553,7 +553,7 @@ var ResizeObserver = window.ResizeObserver || ResizeObserverPolyfill.ResizeObser if (!element.__resizeObserver__) { var resizeObserver = new ResizeObserver(function () { element.__resizeListeners__.forEach(function (listener) { - listener(); + BI.$(element).is(":visible") && listener(); }); }); resizeObserver.observe(element); From b9fbdb6170e1306302c77dd8eab5aca15007487a Mon Sep 17 00:00:00 2001 From: zsmj Date: Thu, 27 Oct 2022 17:17:33 +0800 Subject: [PATCH 34/56] =?UTF-8?q?=E6=97=A0JIRA=20fix:=20tab?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/combination/tab.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/base/combination/tab.js b/src/base/combination/tab.js index 9fe862884..575ecf1a0 100644 --- a/src/base/combination/tab.js +++ b/src/base/combination/tab.js @@ -44,7 +44,7 @@ BI.Tab = BI.inherit(BI.Widget, { cardLayout: this.layout, cardCreator: function (v) { BI.Widget.execWithContext(self, function () { - self.cardMap[v] = o.cardCreator.apply(self, arguments); + self.cardMap[v] = o.cardCreator.call(self, v); }); return self.cardMap[v]; @@ -75,7 +75,7 @@ BI.Tab = BI.inherit(BI.Widget, { var self = this, o = this.options; if (!this.layout.isCardExisted(v)) { BI.Widget.execWithContext(this, function () { - self.cardMap[v] = o.cardCreator.apply(self, arguments); + self.cardMap[v] = o.cardCreator.call(self, v); }); this.layout.addCardByName(v, this.cardMap[v]); } From 0752357a47c980d092ba5caa91b052afdeff1b22 Mon Sep 17 00:00:00 2001 From: zsmj Date: Thu, 27 Oct 2022 17:21:33 +0800 Subject: [PATCH 35/56] =?UTF-8?q?=E6=97=A0jira=20fix:=20tab?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/combination/tab.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/base/combination/tab.js b/src/base/combination/tab.js index 575ecf1a0..933496004 100644 --- a/src/base/combination/tab.js +++ b/src/base/combination/tab.js @@ -44,7 +44,7 @@ BI.Tab = BI.inherit(BI.Widget, { cardLayout: this.layout, cardCreator: function (v) { BI.Widget.execWithContext(self, function () { - self.cardMap[v] = o.cardCreator.call(self, v); + self.cardMap[v] = o.cardCreator(v); }); return self.cardMap[v]; @@ -75,7 +75,7 @@ BI.Tab = BI.inherit(BI.Widget, { var self = this, o = this.options; if (!this.layout.isCardExisted(v)) { BI.Widget.execWithContext(this, function () { - self.cardMap[v] = o.cardCreator.call(self, v); + self.cardMap[v] = o.cardCreator(v); }); this.layout.addCardByName(v, this.cardMap[v]); } From 37a7c0078430465945cddbe0b3f39d63b25c9a74 Mon Sep 17 00:00:00 2001 From: data Date: Thu, 27 Oct 2022 17:46:15 +0800 Subject: [PATCH 36/56] auto upgrade version to 2.0.20221027174605 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b86f38463..012eb232f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221027160615", + "version": "2.0.20221027174605", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From 3f8202499a966ffd3988fbe65f94071d10d411a6 Mon Sep 17 00:00:00 2001 From: guy Date: Fri, 28 Oct 2022 13:59:57 +0800 Subject: [PATCH 37/56] =?UTF-8?q?KERNEL-13158:=20=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/collection/collection.js | 36 +++++++++++++++++++++++++++-- src/base/grid/grid.js | 38 ++++++++++++++++++++++++++++--- 2 files changed, 69 insertions(+), 5 deletions(-) diff --git a/src/base/collection/collection.js b/src/base/collection/collection.js index d7f83a0f5..8d26825d5 100644 --- a/src/base/collection/collection.js +++ b/src/base/collection/collection.js @@ -280,12 +280,44 @@ BI.CollectionView = BI.inherit(BI.Widget, { } }, + _isOverflowX: function () { + var o = this.options; + // 兼容一下 + var scrollable = o.scrollable, scrollx = o.scrollx; + if (o.overflowX === false) { + return false; + } + if (scrollx) { + return true; + } + if (scrollable === true || scrollable === "x") { + return true; + } + return false; + }, + + _isOverflowY: function () { + var o = this.options; + // 兼容一下 + var scrollable = o.scrollable, scrolly = o.scrolly; + if (o.overflowX === false) { + return false; + } + if (scrolly) { + return true; + } + if (scrollable === true || scrollable === "x") { + return true; + } + return false; + }, + _getMaxScrollLeft: function () { - return Math.max(0, this._width - this.options.width + (this.options.overflowX ? BI.DOM.getScrollWidth() : 0)); + return Math.max(0, this._width - this.options.width + (this._isOverflowX() ? BI.DOM.getScrollWidth() : 0)); }, _getMaxScrollTop: function () { - return Math.max(0, this._height - this.options.height + (this.options.overflowY ? BI.DOM.getScrollWidth() : 0)); + return Math.max(0, this._height - this.options.height + (this._isOverflowY() ? BI.DOM.getScrollWidth() : 0)); }, _populate: function (items) { diff --git a/src/base/grid/grid.js b/src/base/grid/grid.js index d1385e4a1..f37201f73 100644 --- a/src/base/grid/grid.js +++ b/src/base/grid/grid.js @@ -96,7 +96,7 @@ BI.GridView = BI.inherit(BI.Widget, { this.element.scrollLeft(o.scrollLeft); } }, - + destroyed: function () { BI.each(this.renderedCells, function(i, cell) { cell.el._destroy(); @@ -262,12 +262,44 @@ BI.GridView = BI.inherit(BI.Widget, { } }, + _isOverflowX: function () { + var o = this.options; + // 兼容一下 + var scrollable = o.scrollable, scrollx = o.scrollx; + if (o.overflowX === false) { + return false; + } + if (scrollx) { + return true; + } + if (scrollable === true || scrollable === "x") { + return true; + } + return false; + }, + + _isOverflowY: function () { + var o = this.options; + // 兼容一下 + var scrollable = o.scrollable, scrolly = o.scrolly; + if (o.overflowX === false) { + return false; + } + if (scrolly) { + return true; + } + if (scrollable === true || scrollable === "x") { + return true; + } + return false; + }, + _getMaxScrollLeft: function () { - return Math.max(0, this._getContainerWidth() - this.options.width + (this.options.overflowX ? BI.DOM.getScrollWidth() : 0)); + return Math.max(0, this._getContainerWidth() - this.options.width + (this._isOverflowX() ? BI.DOM.getScrollWidth() : 0)); }, _getMaxScrollTop: function () { - return Math.max(0, this._getContainerHeight() - this.options.height + (this.options.overflowY ? BI.DOM.getScrollWidth() : 0)); + return Math.max(0, this._getContainerHeight() - this.options.height + (this._isOverflowY() ? BI.DOM.getScrollWidth() : 0)); }, _getContainerWidth: function () { From 35e914d9c36931b28d9094e0ae8e6d9124ea8558 Mon Sep 17 00:00:00 2001 From: guy Date: Fri, 28 Oct 2022 14:10:00 +0800 Subject: [PATCH 38/56] update --- server.js | 2 +- src/base/collection/collection.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/server.js b/server.js index a9fd0cede..5e080f9d4 100644 --- a/server.js +++ b/server.js @@ -9,5 +9,5 @@ const port = 3000; app.use(express.static("./")); app.listen(port, function() { console.log("server start"); - open('http://localhost:' + port + '/index.html'); + open('http://localhost:' + port + '/examples/useContext.html'); }); diff --git a/src/base/collection/collection.js b/src/base/collection/collection.js index 8d26825d5..f45437627 100644 --- a/src/base/collection/collection.js +++ b/src/base/collection/collection.js @@ -290,7 +290,7 @@ BI.CollectionView = BI.inherit(BI.Widget, { if (scrollx) { return true; } - if (scrollable === true || scrollable === "x") { + if (scrollable === true || scrollable === "xy" || scrollable === "x") { return true; } return false; @@ -306,7 +306,7 @@ BI.CollectionView = BI.inherit(BI.Widget, { if (scrolly) { return true; } - if (scrollable === true || scrollable === "x") { + if (scrollable === true || scrollable === "xy" || scrollable === "y") { return true; } return false; From fbc43231b8a44e5e3383feb4fb5adbd1342187b9 Mon Sep 17 00:00:00 2001 From: guy Date: Fri, 28 Oct 2022 14:10:22 +0800 Subject: [PATCH 39/56] update --- server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.js b/server.js index 5e080f9d4..a9fd0cede 100644 --- a/server.js +++ b/server.js @@ -9,5 +9,5 @@ const port = 3000; app.use(express.static("./")); app.listen(port, function() { console.log("server start"); - open('http://localhost:' + port + '/examples/useContext.html'); + open('http://localhost:' + port + '/index.html'); }); From 12d2fc5d5443b0b828c6e3a4ca3a2af3bdf7bce2 Mon Sep 17 00:00:00 2001 From: guy Date: Fri, 28 Oct 2022 14:11:10 +0800 Subject: [PATCH 40/56] update --- src/base/grid/grid.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/base/grid/grid.js b/src/base/grid/grid.js index f37201f73..944a82d4a 100644 --- a/src/base/grid/grid.js +++ b/src/base/grid/grid.js @@ -272,7 +272,7 @@ BI.GridView = BI.inherit(BI.Widget, { if (scrollx) { return true; } - if (scrollable === true || scrollable === "x") { + if (scrollable === true || scrollable === "xy" || scrollable === "x") { return true; } return false; @@ -288,7 +288,7 @@ BI.GridView = BI.inherit(BI.Widget, { if (scrolly) { return true; } - if (scrollable === true || scrollable === "x") { + if (scrollable === true || scrollable === "xy" || scrollable === "y") { return true; } return false; From 19053e204d025700437d4b14b9c45f5c34f2717d Mon Sep 17 00:00:00 2001 From: data Date: Fri, 28 Oct 2022 14:35:12 +0800 Subject: [PATCH 41/56] auto upgrade version to 2.0.20221028143506 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 012eb232f..9c559b39c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221027174605", + "version": "2.0.20221028143506", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From f873cb43c286d0c24080583e2e7839de5f99f07d Mon Sep 17 00:00:00 2001 From: data Date: Fri, 28 Oct 2022 14:56:02 +0800 Subject: [PATCH 42/56] auto upgrade version to 2.0.20221028145548 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9c559b39c..4ba289f11 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221028143506", + "version": "2.0.20221028145548", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From 7ec2bbeb0a55725d7b3b6ec224824c2416ac7aad Mon Sep 17 00:00:00 2001 From: zsmj Date: Fri, 28 Oct 2022 17:47:58 +0800 Subject: [PATCH 43/56] =?UTF-8?q?REPORT-83214=20fix:=20=E4=B8=8D=E5=85=81?= =?UTF-8?q?=E8=AE=B8=E7=BC=96=E8=BE=91=E7=9A=84=E4=B8=8B=E6=8B=89=E6=A0=91?= =?UTF-8?q?=E5=B1=95=E7=A4=BA=E5=A4=9A=E4=BA=86=E6=BB=9A=E5=8A=A8=E6=9D=A1?= =?UTF-8?q?(finui=E7=9A=84bi.multilayer=5Fsingle=5Ftree=5Fcombo=E7=BB=84?= =?UTF-8?q?=E4=BB=B6)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 先改改 --- src/widget/multilayersingletree/multilayersingletree.combo.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/widget/multilayersingletree/multilayersingletree.combo.js b/src/widget/multilayersingletree/multilayersingletree.combo.js index 74876e8d5..4e26c1a0c 100644 --- a/src/widget/multilayersingletree/multilayersingletree.combo.js +++ b/src/widget/multilayersingletree/multilayersingletree.combo.js @@ -49,6 +49,8 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, { } return BI.extend(baseConfig, { + width: BI.toPix(o.width, 2), + height: BI.toPix(o.height, 2), el: { type: "bi.single_tree_trigger", ref: function (_ref) { From 868c0d1a4087bc3dd675e1d490324b2175964264 Mon Sep 17 00:00:00 2001 From: guy Date: Fri, 28 Oct 2022 18:38:53 +0800 Subject: [PATCH 44/56] =?UTF-8?q?feature:=20=E5=A2=9E=E5=8A=A0instruction?= =?UTF-8?q?=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/single/instruction/instruction.js | 75 ++++++++++++++++++++++ src/less/base/single/instruction.less | 31 +++++++++ src/less/base/single/tip/tip.bubble.less | 10 +-- 3 files changed, 112 insertions(+), 4 deletions(-) create mode 100644 src/base/single/instruction/instruction.js create mode 100644 src/less/base/single/instruction.less diff --git a/src/base/single/instruction/instruction.js b/src/base/single/instruction/instruction.js new file mode 100644 index 000000000..f5db6bb09 --- /dev/null +++ b/src/base/single/instruction/instruction.js @@ -0,0 +1,75 @@ +BI.Instruction = BI.inherit(BI.Widget, { + _defaultConfig: function () { + var conf = BI.Link.superclass._defaultConfig.apply(this, arguments); + return BI.extend(conf, { + baseCls: (conf.baseCls || "") + " bi-instruction", + height: 20, + level: "error", + textAlign: "left", + whiteSpace: "nowrap" + }); + }, + + render: function () { + var self = this, o = this.options; + + return { + type: "bi.label", + ref: function (_ref) { + self.text = _ref; + }, + cls: "instruction-" + o.level, + textAlign: o.textAlign, + whiteSpace: o.whiteSpace, + textHeight: o.height, + height: o.height, + hgap: o.hgap, + rgap: o.rgap, + lgap: o.lgap, + vgap: o.vgap, + text: o.text, + keyword: o.keyword, + value: o.value, + py: o.py + }; + }, + + doRedMark: function () { + this.text.doRedMark.apply(this.text, arguments); + }, + + unRedMark: function () { + this.text.unRedMark.apply(this.text, arguments); + }, + + doHighLight: function () { + this.text.doHighLight.apply(this.text, arguments); + }, + + unHighLight: function () { + this.text.unHighLight.apply(this.text, arguments); + }, + + setText: function (v) { + this.options.text = v; + this.text.setText(v); + }, + + getText: function () { + return this.options.text; + }, + + setStyle: function (css) { + this.text.setStyle(css); + }, + + setValue: function (v) { + this.text.setValue(v); + }, + + getValue: function () { + this.text.getValue(); + } +}); + +BI.shortcut("bi.instruction", BI.Instruction); diff --git a/src/less/base/single/instruction.less b/src/less/base/single/instruction.less new file mode 100644 index 000000000..51b9b0af4 --- /dev/null +++ b/src/less/base/single/instruction.less @@ -0,0 +1,31 @@ +@import "../../index.less"; + +.bi-instruction { + .border-radius(2px); + + &.instruction-error{ + background: @color-bi-background-bubble-error; + color: @color-bi-text-failure; + } + + &.instruction-common{ + background: @color-bi-background-bubble-normal; + color: @color-bi-text-highlight; + } + + &.instruction-success{ + background: @color-bi-background-bubble-success; + color: @color-bi-text-success; + } + + &.instruction-warning{ + background: @color-bi-background-bubble-warning; + color: @color-bi-text-redmark; + } +} + +.bi-theme-dark { + .bi-instruction.instruction-error { + background: @color-bi-background-bubble-error-theme-dark; + } +} diff --git a/src/less/base/single/tip/tip.bubble.less b/src/less/base/single/tip/tip.bubble.less index e18e3ffc9..eb151aec4 100644 --- a/src/less/base/single/tip/tip.bubble.less +++ b/src/less/base/single/tip/tip.bubble.less @@ -9,10 +9,6 @@ color: @color-bi-text-failure; } - .bi-theme-dark &.bubble-error { - background: @color-bi-background-bubble-error-theme-dark; - } - &.bubble-common{ background: @color-bi-background-bubble-normal; color: @color-bi-text-highlight; @@ -28,3 +24,9 @@ color: @color-bi-text-redmark; } } + +.bi-theme-dark { + .bi-bubble.bubble-error { + background: @color-bi-background-bubble-error-theme-dark; + } +} From bf472bb8cb6fec3470ad3228c89fbad3b3bfea9a Mon Sep 17 00:00:00 2001 From: guy Date: Fri, 28 Oct 2022 18:48:47 +0800 Subject: [PATCH 45/56] =?UTF-8?q?feature:=20=E5=A2=9E=E5=8A=A0instruction?= =?UTF-8?q?=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/single/instruction/instruction.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/base/single/instruction/instruction.js b/src/base/single/instruction/instruction.js index f5db6bb09..71a61a6f3 100644 --- a/src/base/single/instruction/instruction.js +++ b/src/base/single/instruction/instruction.js @@ -6,7 +6,8 @@ BI.Instruction = BI.inherit(BI.Widget, { height: 20, level: "error", textAlign: "left", - whiteSpace: "nowrap" + whiteSpace: "nowrap", + hgap: 5 }); }, From 79a96d9f65e05d8269540ea2145a5124b1b8787d Mon Sep 17 00:00:00 2001 From: data Date: Fri, 28 Oct 2022 19:16:22 +0800 Subject: [PATCH 46/56] auto upgrade version to 2.0.20221028191610 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4ba289f11..b8425b4ab 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221028145548", + "version": "2.0.20221028191610", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From 293561fa871ec23c2746152ce803289667760eee Mon Sep 17 00:00:00 2001 From: guy Date: Sun, 30 Oct 2022 22:24:08 +0800 Subject: [PATCH 47/56] bugfix --- src/case/layer/panel.js | 41 ++++++++++++++++++++--------------------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/src/case/layer/panel.js b/src/case/layer/panel.js index 5c41e35d9..f73423789 100644 --- a/src/case/layer/panel.js +++ b/src/case/layer/panel.js @@ -11,22 +11,21 @@ BI.Panel = BI.inherit(BI.Widget, { titleHeight: 30, titleButtons: [], el: {}, - logic: { - dynamic: false - } + // logic: { + // dynamic: false + // } }); }, - _init: function () { + render: function () { BI.Panel.superclass._init.apply(this, arguments); var o = this.options; - BI.createWidget(BI.extend({ - element: this - }, BI.LogicFactory.createLogic("vertical", BI.extend(o.logic, { - items: BI.LogicFactory.createLogicItemsByDirection("top", this._createTitle() - , this.options.el) - })))); + return { + type: "bi.vertical_fill", + rowSize: ["", "fill"], + items: [this._createTitle(), this.options.el] + }; }, _createTitle: function () { @@ -56,18 +55,18 @@ BI.Panel = BI.inherit(BI.Widget, { }); return { - el: { - type: "bi.left_right_vertical_adapt", - cls: "panel-title bi-header-background bi-border-bottom", - height: BI.toPix(o.titleHeight, 1), - items: { - left: [this.text], - right: [this.button_group] - }, - lhgap: 10, - rhgap: 10 + // el: { + type: "bi.left_right_vertical_adapt", + cls: "panel-title bi-header-background bi-border-bottom", + height: BI.toPix(o.titleHeight, 1), + items: { + left: [this.text], + right: [this.button_group] }, - height: BI.toPix(o.titleHeight, 1) + lhgap: 10, + rhgap: 10 + // }, + // height: BI.toPix(o.titleHeight, 1) }; }, From bcf8a95f26e7184224da2b187fe5664b752fea63 Mon Sep 17 00:00:00 2001 From: data Date: Mon, 31 Oct 2022 09:54:53 +0800 Subject: [PATCH 48/56] auto upgrade version to 2.0.20221031095439 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b8425b4ab..2b0304fa8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221028191610", + "version": "2.0.20221031095439", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From 6a381643df8d084fe285957678be75b7ba9414c0 Mon Sep 17 00:00:00 2001 From: data Date: Mon, 31 Oct 2022 10:14:54 +0800 Subject: [PATCH 49/56] auto upgrade version to 2.0.20221031101438 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2b0304fa8..614ce7c63 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221031095439", + "version": "2.0.20221031101438", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From a7a9ac94297eb066ef560c0afed7f90da6f4c082 Mon Sep 17 00:00:00 2001 From: zsmj Date: Mon, 31 Oct 2022 10:31:02 +0800 Subject: [PATCH 50/56] =?UTF-8?q?BI-115201=20fix:=20=E3=80=906.0.3.3?= =?UTF-8?q?=E3=80=91=E4=B8=8B=E6=8B=89=E6=A0=91=E4=B8=8B=E6=8B=89=E5=90=8E?= =?UTF-8?q?=E4=B8=8D=E9=80=89=E6=8B=A9=E4=BB=BB=E4=BD=95=E5=86=85=E5=AE=B9?= =?UTF-8?q?=EF=BC=8C=E5=89=8D=E7=AB=AF=E5=A4=9A=E5=8F=91=E4=B8=80=E4=B8=AA?= =?UTF-8?q?data=E8=AF=B7=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- demo/js/widget/multitree/demo.multi_tree_combo.js | 12 ++++++++++-- src/widget/multitree/multi.tree.combo.js | 10 ++++++++-- src/widget/multitree/multi.tree.insert.combo.js | 11 +++++++++-- 3 files changed, 27 insertions(+), 6 deletions(-) diff --git a/demo/js/widget/multitree/demo.multi_tree_combo.js b/demo/js/widget/multitree/demo.multi_tree_combo.js index fcc9107cb..c3e0ffaa4 100644 --- a/demo/js/widget/multitree/demo.multi_tree_combo.js +++ b/demo/js/widget/multitree/demo.multi_tree_combo.js @@ -38,7 +38,15 @@ Demo.MultiTreeCombo = BI.inherit(BI.Widget, { width: 300, value: { "根目录": {} - } + }, + listeners: [ + { + eventName: "EVENT_CONFIRM", + action: function () { + console.log("EVENT_CONFIRM", this.getValue()); + } + } + ] }, { type: "bi.button", text: "getValue", @@ -52,4 +60,4 @@ Demo.MultiTreeCombo = BI.inherit(BI.Widget, { } }); -BI.shortcut("demo.multi_tree_combo", Demo.MultiTreeCombo); \ No newline at end of file +BI.shortcut("demo.multi_tree_combo", Demo.MultiTreeCombo); diff --git a/src/widget/multitree/multi.tree.combo.js b/src/widget/multitree/multi.tree.combo.js index d48e8d6db..8e1e289c1 100644 --- a/src/widget/multitree/multi.tree.combo.js +++ b/src/widget/multitree/multi.tree.combo.js @@ -82,6 +82,7 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, { self.numberCounter.setButtonChecked(val); self.storeValue = { value: self.combo.getValue() }; self.fireEvent(BI.MultiTreeCombo.EVENT_CLICK_ITEM, self.combo.getValue()); + self._dataChange = true; } }, { eventName: BI.MultiTreePopup.EVENT_CLICK_CONFIRM, @@ -92,6 +93,7 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, { eventName: BI.MultiTreePopup.EVENT_CLICK_CLEAR, action: function () { clear = true; + self._dataChange = true; self.setValue(); self._defaultState(); } @@ -180,12 +182,16 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, { this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None); self.numberCounter.setButtonChecked(val); self.fireEvent(BI.MultiTreeCombo.EVENT_CLICK_ITEM, self.combo.getValue()); + self._dataChange = true; }); this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () { if (isSearching()) { return; } + if (!this.isViewVisible()) { + self._dataChange = false; // 标记数据是否发生变化 + } if (change === true) { self.storeValue = { value: self.combo.getValue() }; change = false; @@ -198,7 +204,7 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, { this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW, function () { if (isSearching()) { self._stopEditing(); - self.fireEvent(BI.MultiTreeCombo.EVENT_CONFIRM); + self._dataChange && self.fireEvent(BI.MultiTreeCombo.EVENT_CONFIRM); } else { if (isPopupView()) { self._stopEditing(); @@ -206,7 +212,7 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, { if (clear === true) { self.storeValue = { value: {} }; } - self.fireEvent(BI.MultiTreeCombo.EVENT_CONFIRM); + self._dataChange && self.fireEvent(BI.MultiTreeCombo.EVENT_CONFIRM); } } clear = false; diff --git a/src/widget/multitree/multi.tree.insert.combo.js b/src/widget/multitree/multi.tree.insert.combo.js index c9ce5545f..6db34dc61 100644 --- a/src/widget/multitree/multi.tree.insert.combo.js +++ b/src/widget/multitree/multi.tree.insert.combo.js @@ -56,6 +56,7 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, { self.combo.setValue(self.storeValue); self.numberCounter.setValue(self.storeValue); self._stopEditing(); + self._dataChange = true; } }] } @@ -99,6 +100,7 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, { self.numberCounter.setButtonChecked(val); self.storeValue = { value: self.combo.getValue() }; self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM, self.getValue()); + self._dataChange = true; } }, { eventName: BI.MultiTreePopup.EVENT_CLICK_CONFIRM, @@ -109,6 +111,7 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, { eventName: BI.MultiTreePopup.EVENT_CLICK_CLEAR, action: function () { clear = true; + self._dataChange = true; self.setValue(); self._defaultState(); } @@ -192,12 +195,16 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, { this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None); self.numberCounter.setButtonChecked(val); self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM, self.combo.getValue()); + self._dataChange = true; }); this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () { if (isSearching()) { return; } + if (!this.isViewVisible()) { + self._dataChange = false; // 标记数据是否发生变化 + } if (change === true) { self.storeValue = { value: self.combo.getValue() }; change = false; @@ -210,7 +217,7 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, { this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW, function () { if (isSearching()) { self._stopEditing(); - self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CONFIRM); + self._dataChange && self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CONFIRM); } else { if (isPopupView()) { self._stopEditing(); @@ -218,7 +225,7 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, { if (clear === true) { self.storeValue = { value: {} }; } - self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CONFIRM); + self._dataChange && self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CONFIRM); } } clear = false; From 479c53da141f84c6016fe41b8b4c1f52bdd64520 Mon Sep 17 00:00:00 2001 From: zsmj Date: Mon, 31 Oct 2022 11:48:38 +0800 Subject: [PATCH 51/56] =?UTF-8?q?BI-115201=20fix:=20=E3=80=906.0.3.3?= =?UTF-8?q?=E3=80=91=E4=B8=8B=E6=8B=89=E6=A0=91=E4=B8=8B=E6=8B=89=E5=90=8E?= =?UTF-8?q?=E4=B8=8D=E9=80=89=E6=8B=A9=E4=BB=BB=E4=BD=95=E5=86=85=E5=AE=B9?= =?UTF-8?q?=EF=BC=8C=E5=89=8D=E7=AB=AF=E5=A4=9A=E5=8F=91=E4=B8=80=E4=B8=AA?= =?UTF-8?q?data=E8=AF=B7=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/widget/multitree/multi.tree.list.combo.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/widget/multitree/multi.tree.list.combo.js b/src/widget/multitree/multi.tree.list.combo.js index 9b82b8780..a3a016179 100644 --- a/src/widget/multitree/multi.tree.list.combo.js +++ b/src/widget/multitree/multi.tree.list.combo.js @@ -59,6 +59,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, { self.combo.setValue(self.storeValue); self.numberCounter.setValue(self.storeValue); self._stopEditing(); + self._dataChange = true; } }] } @@ -116,6 +117,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, { self.numberCounter.setButtonChecked(val); self.storeValue = { value: self.combo.getValue() }; self.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM, self.getValue()); + self._dataChange = true; } }, { eventName: BI.MultiTreePopup.EVENT_CLICK_CONFIRM, @@ -126,6 +128,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, { eventName: BI.MultiTreePopup.EVENT_CLICK_CLEAR, action: function () { clear = true; + self._dataChange = true; self.setValue(); self._defaultState(); } @@ -209,12 +212,16 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, { this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None); self.numberCounter.setButtonChecked(val); self.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM, self.combo.getValue()); + self._dataChange = true; }); this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () { if (isSearching()) { return; } + if (!this.isViewVisible()) { + self._dataChange = false; // 标记数据是否发生变化 + } if (change === true) { self.storeValue = { value: self.combo.getValue() }; change = false; @@ -227,7 +234,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, { this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW, function () { if (isSearching()) { self.trigger.stopEditing(); - self.fireEvent(BI.MultiTreeListCombo.EVENT_CONFIRM); + self._dataChange && self.fireEvent(BI.MultiTreeListCombo.EVENT_CONFIRM); } else { if (isPopupView()) { self._stopEditing(); @@ -235,7 +242,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, { if (clear === true) { self.storeValue = { value: [] }; } - self.fireEvent(BI.MultiTreeListCombo.EVENT_CONFIRM); + self._dataChange && self.fireEvent(BI.MultiTreeListCombo.EVENT_CONFIRM); } } clear = false; From a1b83bc5f79509a4020b5b3b7016cabfdd22deb2 Mon Sep 17 00:00:00 2001 From: data Date: Mon, 31 Oct 2022 13:56:49 +0800 Subject: [PATCH 52/56] auto upgrade version to 2.0.20221031135635 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 614ce7c63..3070b532e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221031101438", + "version": "2.0.20221031135635", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From c5c5f066d16a9997f4ba4aba336efcbe5f406c1d Mon Sep 17 00:00:00 2001 From: data Date: Mon, 31 Oct 2022 19:06:12 +0800 Subject: [PATCH 53/56] auto upgrade version to 2.0.20221031190602 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3070b532e..9b298d2fe 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221031135635", + "version": "2.0.20221031190602", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From 06dc1b29848ba059c64f35949c65d42a66f0bdb0 Mon Sep 17 00:00:00 2001 From: "Aries.lsy" <”Aries.lsy@fanruan.com“> Date: Mon, 31 Oct 2022 20:04:49 +0800 Subject: [PATCH 54/56] =?UTF-8?q?REPORT-82014=20fix:=E8=A1=A5=E9=BD=90AFTE?= =?UTF-8?q?R=5FHIDEVIEW=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../combo/searchtextvaluecombo/combo.searchtextvalue.js | 2 ++ src/component/treevaluechooser/combo.treevaluechooser.js | 6 ++++++ src/widget/multitree/multi.tree.combo.js | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/src/case/combo/searchtextvaluecombo/combo.searchtextvalue.js b/src/case/combo/searchtextvaluecombo/combo.searchtextvalue.js index 63f73944a..baa653207 100644 --- a/src/case/combo/searchtextvaluecombo/combo.searchtextvalue.js +++ b/src/case/combo/searchtextvaluecombo/combo.searchtextvalue.js @@ -91,6 +91,7 @@ BI.SearchTextValueCombo = BI.inherit(BI.Widget, { eventName: BI.Combo.EVENT_AFTER_HIDEVIEW, action: function () { self.trigger.stopEditing(); + self.fireEvent(BI.SearchTextValueCombo.EVENT_AFTER_HIDEVIEW); } }, { eventName: BI.Combo.EVENT_BEFORE_POPUPVIEW, @@ -148,4 +149,5 @@ BI.SearchTextValueCombo = BI.inherit(BI.Widget, { }); BI.SearchTextValueCombo.EVENT_CHANGE = "EVENT_CHANGE"; BI.SearchTextValueCombo.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW"; +BI.SearchTextValueCombo.EVENT_AFTER_HIDEVIEW = "EVENT_AFTER_HIDEVIEW" BI.shortcut("bi.search_text_value_combo", BI.SearchTextValueCombo); diff --git a/src/component/treevaluechooser/combo.treevaluechooser.js b/src/component/treevaluechooser/combo.treevaluechooser.js index 7b42f3d74..2c0709d67 100644 --- a/src/component/treevaluechooser/combo.treevaluechooser.js +++ b/src/component/treevaluechooser/combo.treevaluechooser.js @@ -73,6 +73,11 @@ BI.TreeValueChooserCombo = BI.inherit(BI.AbstractTreeValueChooser, { action: function () { self.fireEvent(BI.TreeValueChooserCombo.EVENT_BEFORE_POPUPVIEW); } + }, { + eventName: BI.MultiTreeCombo.EVENT_AFTER_HIDEVIEW, + action: function () { + self.fireEvent(BI.TreeValueChooserCombo.EVENT_AFTER_HIDEVIEW); + } }] }); }, @@ -128,4 +133,5 @@ BI.TreeValueChooserCombo.EVENT_BLUR = "EVENT_BLUR"; BI.TreeValueChooserCombo.EVENT_STOP = "EVENT_STOP"; BI.TreeValueChooserCombo.EVENT_CLICK_ITEM = "EVENT_CLICK_ITEM"; BI.TreeValueChooserCombo.EVENT_SEARCHING = "EVENT_SEARCHING"; +BI.TreeValueChooserCombo.EVENT_AFTER_HIDEVIEW = "EVENT_AFTER_HIDEVIEW"; BI.shortcut("bi.tree_value_chooser_combo", BI.TreeValueChooserCombo); diff --git a/src/widget/multitree/multi.tree.combo.js b/src/widget/multitree/multi.tree.combo.js index d48e8d6db..9853784d5 100644 --- a/src/widget/multitree/multi.tree.combo.js +++ b/src/widget/multitree/multi.tree.combo.js @@ -212,6 +212,9 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, { clear = false; change = false; }); + this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW, function () { + self.fireEvent(BI.MultiTreeCombo.EVENT_AFTER_HIDEVIEW); + }); var triggerBtn = BI.createWidget({ type: "bi.trigger_icon_button", @@ -367,5 +370,6 @@ BI.MultiTreeCombo.EVENT_SEARCHING = "EVENT_SEARCHING"; BI.MultiTreeCombo.EVENT_CLICK_ITEM = "EVENT_CLICK_ITEM"; BI.MultiTreeCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.MultiTreeCombo.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW"; +BI.MultiTreeCombo.EVENT_AFTER_HIDEVIEW = "EVENT_AFTER_HIDEVIEW"; BI.shortcut("bi.multi_tree_combo", BI.MultiTreeCombo); From 3e79f1a2d74b5fd974e8319a1f69c94c2f2b6a4f Mon Sep 17 00:00:00 2001 From: data Date: Mon, 31 Oct 2022 22:16:21 +0800 Subject: [PATCH 55/56] auto upgrade version to 2.0.20221031221611 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9b298d2fe..167553999 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221031190602", + "version": "2.0.20221031221611", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From f7fe05da3f56c3a7c58b028b6fde4c06fa660632 Mon Sep 17 00:00:00 2001 From: data Date: Tue, 1 Nov 2022 10:05:33 +0800 Subject: [PATCH 56/56] auto upgrade version to 2.0.20221101100519 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 167553999..d8d1135eb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221031221611", + "version": "2.0.20221101100519", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts",