From 75644559d41011b289048c11f8a8b7ded471914e Mon Sep 17 00:00:00 2001 From: zsmj Date: Tue, 1 Nov 2022 11:36:32 +0800 Subject: [PATCH 01/68] =?UTF-8?q?DESIGN-4355=20feat:=20tooltip=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E5=BC=82=E6=AD=A5=E8=8E=B7=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/single/0.single.js | 55 +++++++++++++++++++++++++------------ 1 file changed, 37 insertions(+), 18 deletions(-) diff --git a/src/base/single/0.single.js b/src/base/single/0.single.js index 93705ca91..0d42ec143 100644 --- a/src/base/single/0.single.js +++ b/src/base/single/0.single.js @@ -19,35 +19,35 @@ BI.Single = BI.inherit(BI.Widget, { return BI.extend(conf, { readonly: false, title: null, - warningTitle: null, - tipType: null, // success或warning - belowMouse: false, // title是否跟随鼠标 + warningTitle: null, // deprecated + tipType: null, // deprecated success或warning + belowMouse: false, // title是否跟随鼠标 enableHover: false, }); }, _showToolTip: function (e, opt) { opt || (opt = {}); + var self = this; var o = this.options; - var tooltipOpt = {}; var title = this.getTitle(); - if (BI.isPlainObject(title)) { - tooltipOpt = title; + + if (title instanceof Promise) { + title.then(resolvedTitle => { + this.mouseOver && showToolTip(this._getTooltipOptions(resolvedTitle)); + }); } else { - tooltipOpt.level = this.getTipType() || "success"; - // 由于以前的用法,存在大量disabled:true搭配warningTitle的情况,所以这里做一个兼容,disabled:true的情况下,依然优先显示warningTitle,避免只设置了warningTitle而没有设置title的情况 - if (BI.isNull(o.tipType) && !this.isEnabled()) { - tooltipOpt.text = (this.getWarningTitle() || title); - } else { - tooltipOpt.text = tooltipOpt.level === "success" ? title : (this.getWarningTitle() || title); - } + showToolTip(this._getTooltipOptions(title)); } - if (BI.isKey(tooltipOpt.text)) { - BI.Tooltips.show(e, this.getName(), tooltipOpt, this, opt); - if (o.action) { - BI.Actions.runAction(o.action, "hover", o, this); + + function showToolTip(tooltipOpt) { + if (BI.isKey(tooltipOpt.text) && !BI.Tooltips.has(self.getName())) { + BI.Tooltips.show(e, self.getName(), tooltipOpt, self, opt); + if (o.action) { + BI.Actions.runAction(o.action, "hover", o, self); + } + BI.Actions.runGlobalAction("hover", o, self); } - BI.Actions.runGlobalAction("hover", o, this); } }, @@ -91,12 +91,30 @@ BI.Single = BI.inherit(BI.Widget, { } }, + _getTooltipOptions: function (title) { + var o = this.options; + var tooltipOpt = {}; + if (BI.isPlainObject(title)) { + tooltipOpt = title; + } else { + tooltipOpt.level = this.getTipType() || "success"; + // 由于以前的用法,存在大量disabled:true搭配warningTitle的情况,所以这里做一个兼容,disabled:true的情况下,依然优先显示warningTitle,避免只设置了warningTitle而没有设置title的情况 + if (BI.isNull(o.tipType) && !this.isEnabled()) { + tooltipOpt.text = (this.getWarningTitle() || title); + } else { + tooltipOpt.text = tooltipOpt.level === "success" ? title : (this.getWarningTitle() || title); + } + } + return tooltipOpt; + }, + enableHover: function (opt) { opt || (opt = {}); var self = this; if (!this._hoverBinded) { this.element.unbind("mouseenter.title").on("mouseenter.title", function (e) { self._e = e; + self.mouseOver = true; if (self.getTipType() === "warning" || (BI.isKey(self.getWarningTitle()) && !self.isEnabled())) { delayingTooltips = self.getName(); self.showTimeout = BI.delay(function () { @@ -144,6 +162,7 @@ BI.Single = BI.inherit(BI.Widget, { }); this.element.unbind("mouseleave.title").on("mouseleave.title", function (e) { self._e = null; + self.mouseOver = false; self._clearTimeOut(); self._hideTooltip(); }); From 4889554cfd5c41c01032712a47a18fc3b61bb2f9 Mon Sep 17 00:00:00 2001 From: zsmj Date: Tue, 1 Nov 2022 17:07:12 +0800 Subject: [PATCH 02/68] =?UTF-8?q?DESIGN-4355=20feat:=20tooltip=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E5=BC=82=E6=AD=A5=E8=8E=B7=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/single/0.single.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/base/single/0.single.js b/src/base/single/0.single.js index 0d42ec143..c13e02e81 100644 --- a/src/base/single/0.single.js +++ b/src/base/single/0.single.js @@ -33,8 +33,10 @@ BI.Single = BI.inherit(BI.Widget, { var title = this.getTitle(); if (title instanceof Promise) { + this.requestingTitle = title; title.then(resolvedTitle => { - this.mouseOver && showToolTip(this._getTooltipOptions(resolvedTitle)); + // 由于是异步的,所以无法避免Promise resolve时机问题,所以设计为:鼠标移出了则不显示,并且只显示最后一次发起的查询结果 + this.mouseOver && this.requestingTitle === title && showToolTip(this._getTooltipOptions(resolvedTitle)); }); } else { showToolTip(this._getTooltipOptions(title)); From 3390d8ed24de2a97c15c06a51a1fa795df822943 Mon Sep 17 00:00:00 2001 From: zsmj Date: Tue, 1 Nov 2022 17:07:46 +0800 Subject: [PATCH 03/68] =?UTF-8?q?=E6=97=A0JIRA=20fix:=20=E5=9B=BE=E6=A0=87?= =?UTF-8?q?=E5=86=99=E5=8F=8D=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/case/button/node/siwtcher.tree.node.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/case/button/node/siwtcher.tree.node.js b/src/case/button/node/siwtcher.tree.node.js index 89d055c51..8669f697b 100644 --- a/src/case/button/node/siwtcher.tree.node.js +++ b/src/case/button/node/siwtcher.tree.node.js @@ -32,10 +32,10 @@ BI.TreeNodeSwitcher = BI.inherit(BI.NodeButton, { return BI.STYLE_CONSTANTS.LINK_LINE_TYPE === "solid" ? ["tree-solid-collapse-icon-type1", "tree-solid-expand-icon-type1"] : ["tree-collapse-icon-type2", "tree-expand-icon-type2"]; } else if (options.isLastNode) { // 最后一个节点 - return BI.STYLE_CONSTANTS.LINK_LINE_TYPE === "solid" ? ["tree-solid-collapse-icon-type1", "tree-solid-expand-icon-type1"] : ["tree-collapse-icon-type3", "tree-expand-icon-type3"]; + return BI.STYLE_CONSTANTS.LINK_LINE_TYPE === "solid" ? ["tree-solid-collapse-icon-type1", "tree-solid-expand-icon-type1"] : ["tree-collapse-icon-type4", "tree-expand-icon-type4"]; } else { // 其他情况 - return BI.STYLE_CONSTANTS.LINK_LINE_TYPE === "solid" ? ["tree-solid-collapse-icon-type1", "tree-solid-expand-icon-type1"] : ["tree-collapse-icon-type4", "tree-expand-icon-type4"]; + return BI.STYLE_CONSTANTS.LINK_LINE_TYPE === "solid" ? ["tree-solid-collapse-icon-type1", "tree-solid-expand-icon-type1"] : ["tree-collapse-icon-type3", "tree-expand-icon-type3"]; } }, From 0293ab2064db2aacef11126a8344193a88cc4a88 Mon Sep 17 00:00:00 2001 From: data Date: Tue, 1 Nov 2022 19:55:13 +0800 Subject: [PATCH 04/68] auto upgrade version to 2.0.20221101195503 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d8d1135eb..864d956f2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221101100519", + "version": "2.0.20221101195503", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From 43ecbf5be860485a6c3d7c9a42b9db7b09e3e7f2 Mon Sep 17 00:00:00 2001 From: guy Date: Wed, 2 Nov 2022 11:35:44 +0800 Subject: [PATCH 05/68] =?UTF-8?q?KERNEL-13158:=20context=E8=B7=B3=E8=BF=87?= =?UTF-8?q?popup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dist/fix/fix.compact.js | 4 +- examples/useContext.html | 54 +++++++++++++++++++++++++-- src/widget/downlist/combo.downlist.js | 37 +++++++++--------- 3 files changed, 72 insertions(+), 23 deletions(-) diff --git a/dist/fix/fix.compact.js b/dist/fix/fix.compact.js index 6179d484b..1fdba9727 100644 --- a/dist/fix/fix.compact.js +++ b/dist/fix/fix.compact.js @@ -109,13 +109,13 @@ pushTarget(this.store); return true; } - if (this._store) { + if (this._store || this.options._store) { var store = BI.Widget.findStore(this.options.context || this._parent || this.options.element || this._context); if (store) { pushTarget(store); needPop = true; } - this.store = this._store(); + this.store = (this._store || this.options._store)(); this.store && (this.store._widget = this); needPop && popTarget(); needPop = false; diff --git a/examples/useContext.html b/examples/useContext.html index 4f91239bd..96e40628c 100644 --- a/examples/useContext.html +++ b/examples/useContext.html @@ -25,7 +25,7 @@ cssScale: 2.0 }; }, - childContext: ["text"], + childContext: ["text", "cssScale"], computed: { text: function () { @@ -41,10 +41,20 @@ }); BI.model("demo.model", Model); + var TempModel = BI.inherit(BI.Model, { + state: function () { + return { + cssScale: 1.0 + }; + }, + childContext: ["cssScale"], + }); + BI.model("demo.temp_model", TempModel); + var oldFormat = BI.pixFormat; BI.pixFormat = function (pix, border) { var context = BI.useContext("cssScale"); - if (!context) { + if (!context || context.model.cssScale <=1) { return oldFormat.apply(this, arguments); } if (!BI.isNumber(pix)) { @@ -59,8 +69,8 @@ var oldPix = BI.toPix; BI.toPix = function (pix, border) { var context = BI.useContext("cssScale"); - if (!context) { - return oldPix.apply(this, arguments); + if (!context || context.model.cssScale <=1) { + return oldFormat.apply(this, arguments); } if (!BI.isNumber(pix)) { return pix; @@ -130,6 +140,42 @@ day: 15 } } + }, { + type: "bi.down_list_combo", + cls: "bi-border", + width: 24, + height: 24, + popup: { + _store: function () { + return BI.Models.getModel("demo.temp_model"); + } + }, + value: [{value: 2}, {value: 3, childValue: 4}], + items: [[{ + text: "属于", + value: 1, + cls: "dot-e-font" + }, { + text: "不属于", + value: 2, + cls: "dot-e-font" + }], [{ + el: { + text: "大于", + value: 3, + iconCls1: "dot-e-font" + }, + value: 3, + children: [{ + text: "固定值", + value: 4, + cls: "dot-e-font" + }, { + text: "平均值", + value: 5, + cls: "dot-e-font" + }] + }]] }] }; }; diff --git a/src/widget/downlist/combo.downlist.js b/src/widget/downlist/combo.downlist.js index cf983dfc4..8b9aa4c0c 100644 --- a/src/widget/downlist/combo.downlist.js +++ b/src/widget/downlist/combo.downlist.js @@ -17,7 +17,7 @@ text: item.text, icon: item.icon, cls: item.cls, - iconCls1: item.iconCls1, + iconCls1: item.iconCls1, value: item.value }; } @@ -25,7 +25,7 @@ }); return result; } - + /** * Created by roy on 15/8/14. */ @@ -41,16 +41,17 @@ container: null, stopPropagation: false, el: {}, + popup: {}, minWidth: 140, maxHeight: 1000, destroyWhenHide: false }); }, - + _init: function () { BI.DownListCombo.superclass._init.apply(this, arguments); var self = this, o = this.options; - + this.downlistcombo = BI.createWidget({ element: this, type: "bi.combo", @@ -63,12 +64,13 @@ belowMouse: o.belowMouse, stopPropagation: o.stopPropagation, destroyWhenHide: o.destroyWhenHide, - el: BI.createWidget(o.el, { + el: { type: "bi.icon_trigger", extraCls: o.iconCls, width: o.width, - height: o.height - }), + height: o.height, + ...o.el + }, popup: { el: { type: "bi.down_list_popup", @@ -94,39 +96,40 @@ }, stopPropagation: o.stopPropagation, maxHeight: o.maxHeight, - minWidth: o.minWidth + minWidth: o.minWidth, + ...o.popup } }); - + this.downlistcombo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () { self.fireEvent(BI.DownListCombo.EVENT_BEFORE_POPUPVIEW); }); }, - + hideView: function () { this.downlistcombo.hideView(); }, - + showView: function (e) { this.downlistcombo.showView(e); }, - + populate: function (items) { this.popupView.populate(items); }, - + setValue: function (v) { this.popupView.setValue(v); }, - + getValue: function () { return this.popupView.getValue(); }, - + adjustWidth: function () { this.downlistcombo.adjustWidth(); }, - + adjustHeight: function () { this.downlistcombo.adjustHeight(); } @@ -134,6 +137,6 @@ BI.DownListCombo.EVENT_CHANGE = "EVENT_CHANGE"; BI.DownListCombo.EVENT_SON_VALUE_CHANGE = "EVENT_SON_VALUE_CHANGE"; BI.DownListCombo.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW"; - + BI.shortcut("bi.down_list_combo", BI.DownListCombo); }()); From 3c2d7e826754cc12097004c52e2051f308e93ad7 Mon Sep 17 00:00:00 2001 From: guy Date: Wed, 2 Nov 2022 11:42:40 +0800 Subject: [PATCH 06/68] =?UTF-8?q?KERNEL-13158:=20context=E8=B7=B3=E8=BF=87?= =?UTF-8?q?popup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/useContext.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/useContext.html b/examples/useContext.html index 96e40628c..f770cd294 100644 --- a/examples/useContext.html +++ b/examples/useContext.html @@ -119,7 +119,7 @@ var child; var store = BI.useStore(); return function () { - this.element[0].style.setProperty('--css-scale', store.model.cssScale); + this.element[0].style.setProperty('--css-scale', 2); return { type: "bi.vertical", vgap: 20, From 4c54640fee1858b4da24ce0e8d4637771fb314af Mon Sep 17 00:00:00 2001 From: guy Date: Wed, 2 Nov 2022 11:43:34 +0800 Subject: [PATCH 07/68] =?UTF-8?q?KERNEL-13158:=20context=E8=B7=B3=E8=BF=87?= =?UTF-8?q?popup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/useContext.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/useContext.html b/examples/useContext.html index f770cd294..4092713e9 100644 --- a/examples/useContext.html +++ b/examples/useContext.html @@ -22,7 +22,7 @@ state: function () { return { expand: false, - cssScale: 2.0 + cssScale: true }; }, childContext: ["text", "cssScale"], @@ -44,7 +44,7 @@ var TempModel = BI.inherit(BI.Model, { state: function () { return { - cssScale: 1.0 + cssScale: false }; }, childContext: ["cssScale"], @@ -54,7 +54,7 @@ var oldFormat = BI.pixFormat; BI.pixFormat = function (pix, border) { var context = BI.useContext("cssScale"); - if (!context || context.model.cssScale <=1) { + if (!context || context.model.cssScale === false) { return oldFormat.apply(this, arguments); } if (!BI.isNumber(pix)) { @@ -69,7 +69,7 @@ var oldPix = BI.toPix; BI.toPix = function (pix, border) { var context = BI.useContext("cssScale"); - if (!context || context.model.cssScale <=1) { + if (!context || context.model.cssScale === false) { return oldFormat.apply(this, arguments); } if (!BI.isNumber(pix)) { From 72d40d30d86080beb162b99f0941a7499be08e06 Mon Sep 17 00:00:00 2001 From: data Date: Wed, 2 Nov 2022 14:35:47 +0800 Subject: [PATCH 08/68] auto upgrade version to 2.0.20221102143540 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 864d956f2..a8cca0fbc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221101195503", + "version": "2.0.20221102143540", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From 42f63d618b9a583e1f22064a1824aa939cfc4d21 Mon Sep 17 00:00:00 2001 From: data Date: Wed, 2 Nov 2022 15:05:09 +0800 Subject: [PATCH 09/68] auto upgrade version to 2.0.20221102150501 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a8cca0fbc..e4f7bd149 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221102143540", + "version": "2.0.20221102150501", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From fc3e0f8319c2f90cd4328c23acd8c0f2889b9953 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cauchy=2EKe-=E6=9F=AF=E5=B0=8F=E9=BE=99?= Date: Wed, 2 Nov 2022 17:14:50 +0800 Subject: [PATCH 10/68] =?UTF-8?q?fix:=E8=A1=A5=E5=85=85=E4=B8=A2=E5=A4=B1?= =?UTF-8?q?=E7=9A=84this=E5=BC=95=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dist/fix/fix.compact.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist/fix/fix.compact.js b/dist/fix/fix.compact.js index 1fdba9727..dced5e166 100644 --- a/dist/fix/fix.compact.js +++ b/dist/fix/fix.compact.js @@ -115,7 +115,7 @@ pushTarget(store); needPop = true; } - this.store = (this._store || this.options._store)(); + this.store = (this._store || this.options._store).call(this); this.store && (this.store._widget = this); needPop && popTarget(); needPop = false; From fbfb588d400935fe87670b6a01bd4d814b268f9b Mon Sep 17 00:00:00 2001 From: data Date: Wed, 2 Nov 2022 17:56:00 +0800 Subject: [PATCH 11/68] auto upgrade version to 2.0.20221102175548 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e4f7bd149..2caf34e3b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221102150501", + "version": "2.0.20221102175548", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From c2d87e089d5ff050069ee337f6de28889ade3c08 Mon Sep 17 00:00:00 2001 From: data Date: Wed, 2 Nov 2022 18:55:46 +0800 Subject: [PATCH 12/68] auto upgrade version to 2.0.20221102185525 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2caf34e3b..2b7e1f3a2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221102175548", + "version": "2.0.20221102185525", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From 4aac8e2de92fb3fff10bb227e228c5b105bb1925 Mon Sep 17 00:00:00 2001 From: zsmj Date: Thu, 3 Nov 2022 11:04:03 +0800 Subject: [PATCH 13/68] =?UTF-8?q?=E6=97=A0JRIA=20fix:=20=E5=A4=8D=E9=80=89?= =?UTF-8?q?=E4=B8=8B=E6=8B=89=E7=9A=84=E6=95=B0=E5=AD=97=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/less/widget/multiselect/trigger/button.checkselected.less | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/less/widget/multiselect/trigger/button.checkselected.less b/src/less/widget/multiselect/trigger/button.checkselected.less index 35c00dec0..b02c76e80 100644 --- a/src/less/widget/multiselect/trigger/button.checkselected.less +++ b/src/less/widget/multiselect/trigger/button.checkselected.less @@ -3,7 +3,8 @@ .bi-multi-select-check-selected-button { z-index: 1; min-width: 16px; - .border-radius(8px); + .border-radius(50%); + &:active { color: @color-bi-text-highlight; background-color: @color-bi-background-multi-select-trigger-check-selected; From 1ba3c656445669088350e21447bb40ece4f3a5df Mon Sep 17 00:00:00 2001 From: zsmj Date: Thu, 3 Nov 2022 13:36:46 +0800 Subject: [PATCH 14/68] =?UTF-8?q?REPORT-83685=20fix:=20BI.parseDateTime?= =?UTF-8?q?=E6=96=B9=E6=B3=95=E5=AF=B9%l:%M:%S=20%p=E8=BF=99=E7=A7=8D?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E7=9A=84=E6=97=A5=E6=9C=9F=E8=A7=A3=E6=9E=90?= =?UTF-8?q?=E5=87=BA=E9=94=99=EF=BC=88=E5=90=8E=E9=9D=A2=E5=B8=A6%p=20?= =?UTF-8?q?=E8=BF=99=E7=A7=8D=E7=9A=84=E9=83=BD=E6=98=AF=E5=90=8C=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E7=9A=84=E6=8A=A5=E9=94=99=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/2.base.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/2.base.js b/src/core/2.base.js index d7007de52..63ff1821d 100644 --- a/src/core/2.base.js +++ b/src/core/2.base.js @@ -1079,7 +1079,7 @@ case "%b": case "%B": for (j = 0; j < 12; ++j) { - if (BI.Date._MN[j].substr(0, a[i].length).toLowerCase() == a[i].toLowerCase()) { + if (BI.getMonthName(j).substr(0, a[i].length).toLowerCase() == a[i].toLowerCase()) { m = j; break; } @@ -1144,7 +1144,7 @@ if (a[i].search(/[a-zA-Z]+/) != -1) { var t = -1; for (j = 0; j < 12; ++j) { - if (BI.Date._MN[j].substr(0, a[i].length).toLowerCase() == a[i].toLowerCase()) { + if (BI.getMonthName(j).substr(0, a[i].length).toLowerCase() == a[i].toLowerCase()) { t = j; break; } From aa1821f70b627137a36df449d0222fa04869ba67 Mon Sep 17 00:00:00 2001 From: data Date: Thu, 3 Nov 2022 14:17:48 +0800 Subject: [PATCH 15/68] auto upgrade version to 2.0.20221103141722 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2b7e1f3a2..d3027b82b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221102185525", + "version": "2.0.20221103141722", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From b52589d7edaa65118578ecf31bcedd50699414a0 Mon Sep 17 00:00:00 2001 From: zsmj Date: Thu, 3 Nov 2022 14:32:03 +0800 Subject: [PATCH 16/68] =?UTF-8?q?REPORT-83685=20fix:=20BI.parseDateTime?= =?UTF-8?q?=E6=96=B9=E6=B3=95=E5=AF=B9%l:%M:%S=20%p=E8=BF=99=E7=A7=8D?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E7=9A=84=E6=97=A5=E6=9C=9F=E8=A7=A3=E6=9E=90?= =?UTF-8?q?=E5=87=BA=E9=94=99=EF=BC=88=E5=90=8E=E9=9D=A2=E5=B8=A6%p=20?= =?UTF-8?q?=E8=BF=99=E7=A7=8D=E7=9A=84=E9=83=BD=E6=98=AF=E5=90=8C=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E7=9A=84=E6=8A=A5=E9=94=99=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/func/alias.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/func/alias.js b/src/core/func/alias.js index 0dca26ca6..2884e492b 100644 --- a/src/core/func/alias.js +++ b/src/core/func/alias.js @@ -815,7 +815,7 @@ break; case "M": // 月 if (len > 2) { - str = BI.Date._MN[date.getMonth()]; + str = BI.getMonthName(date.getMonth()); } else if (len < 2) { str = date.getMonth() + 1; } else { From 3903acbe2d2ecb59c5fa90cd89862c1d397d8ebe Mon Sep 17 00:00:00 2001 From: guy Date: Thu, 3 Nov 2022 15:08:48 +0800 Subject: [PATCH 17/68] =?UTF-8?q?KERNEL-13158:=20context=E8=B7=B3=E8=BF=87?= =?UTF-8?q?popup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/case/layer/panel.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/case/layer/panel.js b/src/case/layer/panel.js index f73423789..4ec115b51 100644 --- a/src/case/layer/panel.js +++ b/src/case/layer/panel.js @@ -18,9 +18,6 @@ BI.Panel = BI.inherit(BI.Widget, { }, render: function () { - BI.Panel.superclass._init.apply(this, arguments); - var o = this.options; - return { type: "bi.vertical_fill", rowSize: ["", "fill"], From 925ba1387afb4d4443a76129925e1a9fec5cb978 Mon Sep 17 00:00:00 2001 From: data Date: Thu, 3 Nov 2022 15:38:14 +0800 Subject: [PATCH 18/68] auto upgrade version to 2.0.20221103153759 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d3027b82b..980ee16a0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221103141722", + "version": "2.0.20221103153759", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From 26bf2679d5689272c555bd8ff871cfc7d8cf8a2e Mon Sep 17 00:00:00 2001 From: data Date: Thu, 3 Nov 2022 16:26:20 +0800 Subject: [PATCH 19/68] auto upgrade version to 2.0.20221103162604 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 980ee16a0..81a548ecd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221103153759", + "version": "2.0.20221103162604", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From 724404e6b5850027821cba6cc1da3ef17c643880 Mon Sep 17 00:00:00 2001 From: data Date: Thu, 3 Nov 2022 16:35:44 +0800 Subject: [PATCH 20/68] auto upgrade version to 2.0.20221103163534 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 81a548ecd..4c66bfcb5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221103162604", + "version": "2.0.20221103163534", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From d0b104e67153a0adf37dc5846f9fd5679818fd0c Mon Sep 17 00:00:00 2001 From: zsmj Date: Thu, 3 Nov 2022 21:28:52 +0800 Subject: [PATCH 21/68] =?UTF-8?q?BI-115904=20fix:=20=E3=80=90=E6=9D=A5?= =?UTF-8?q?=E6=BA=90=E5=86=85=E6=B5=8BBUG=E3=80=91=E5=B1=95=E5=BC=80?= =?UTF-8?q?=E4=B8=8B=E6=8B=89=E6=A0=91=E5=AD=90=E8=8A=82=E7=82=B9=EF=BC=8C?= =?UTF-8?q?=E4=BC=9A=E5=87=BA=E7=8E=B0=E9=87=8D=E5=A4=8D=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/case/ztree/1.asynctree.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/case/ztree/1.asynctree.js b/src/case/ztree/1.asynctree.js index dde174b5b..ef44f50d3 100644 --- a/src/case/ztree/1.asynctree.js +++ b/src/case/ztree/1.asynctree.js @@ -1,6 +1,6 @@ /** * guy - * 同步树 + * 异步树 * @class BI.AsyncTree * @extends BI.TreeView */ @@ -194,7 +194,8 @@ BI.AsyncTree = BI.inherit(BI.TreeView, { // 展开节点会将halfCheck置为false以开启自动计算半选, 所以第一次展开节点的时候需要在置为false之前获取配置 var checkState = treeNode.getCheckStatus(); - if (!treeNode.children) { + if (!treeNode.children && !treeNode.requested) { + treeNode.requested = true; setTimeout(function () { getNodes({ times: 1, From d5735be70fc6088920f8b93171a3297a60d24df1 Mon Sep 17 00:00:00 2001 From: data Date: Fri, 4 Nov 2022 11:06:42 +0800 Subject: [PATCH 22/68] auto upgrade version to 2.0.20221104110628 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4c66bfcb5..44d6d6029 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221103163534", + "version": "2.0.20221104110628", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From 17a888e39d1e9a4cf5174f855dcbdb99b2cf471a Mon Sep 17 00:00:00 2001 From: data Date: Fri, 4 Nov 2022 13:56:10 +0800 Subject: [PATCH 23/68] auto upgrade version to 2.0.20221104135556 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 44d6d6029..8d5f2830e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221104110628", + "version": "2.0.20221104135556", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From 9bc78212767f8547e06942b1f9d6e3addf3ad0ae Mon Sep 17 00:00:00 2001 From: Sylar Date: Fri, 4 Nov 2022 14:51:55 +0800 Subject: [PATCH 24/68] =?UTF-8?q?REPORT-83708=20fix:=20=E5=88=9B=E5=BB=BAB?= =?UTF-8?q?lob=E6=97=B6=E6=8C=87=E5=AE=9A=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/webpack-fui-worker-plugin/worker-loader.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/webpack-fui-worker-plugin/worker-loader.js b/plugins/webpack-fui-worker-plugin/worker-loader.js index c9dad87d5..2c19eecce 100644 --- a/plugins/webpack-fui-worker-plugin/worker-loader.js +++ b/plugins/webpack-fui-worker-plugin/worker-loader.js @@ -117,7 +117,7 @@ function loader() { // 添加 @ts-nocheck 避免 ts-check 报错 // 修复export const 下 const不会被转译的问题 `// @ts-nocheck - export default window.URL.createObjectURL(new Blob([${JSON.stringify(compilation.assets[entry].source())}])); + export default window.URL.createObjectURL(new Blob([${JSON.stringify(compilation.assets[entry].source())}], { type: 'text/javascript' })); ` ) : callback( From 8c3b50b19ed2fc6c1a3cf22db2b4f8342ffb7220 Mon Sep 17 00:00:00 2001 From: zsmj Date: Fri, 4 Nov 2022 15:59:30 +0800 Subject: [PATCH 25/68] =?UTF-8?q?=E6=97=A0JIRA=20=20fix:=20bi.text=5Fvalue?= =?UTF-8?q?=5Fdown=5Flist=5Fcombo=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../combo.textvaluedownlist.js | 24 ++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/src/widget/textvaluedownlistcombo/combo.textvaluedownlist.js b/src/widget/textvaluedownlistcombo/combo.textvaluedownlist.js index 9410d9190..956e18552 100644 --- a/src/widget/textvaluedownlistcombo/combo.textvaluedownlist.js +++ b/src/widget/textvaluedownlistcombo/combo.textvaluedownlist.js @@ -19,14 +19,6 @@ BI.TextValueDownListCombo = BI.inherit(BI.Widget, { if(BI.isNotNull(o.value)) { value = this._digest(o.value); } - this.trigger = BI.createWidget({ - type: "bi.down_list_select_text_trigger", - cls: "text-value-down-list-trigger", - height: BI.toPix(o.height, 2), - items: o.items, - text: o.text, - value: value - }); this.combo = BI.createWidget({ type: "bi.down_list_combo", @@ -35,7 +27,17 @@ BI.TextValueDownListCombo = BI.inherit(BI.Widget, { adjustLength: 2, width: BI.toPix(o.width, 2), height: BI.toPix(o.height, 2), - el: this.trigger, + el: { + type: "bi.down_list_select_text_trigger", + ref: function (_ref) { + self.trigger = _ref; + }, + cls: "text-value-down-list-trigger", + height: BI.toPix(o.height, 2), + items: o.items, + text: o.text, + value: value + }, value: BI.isNull(value) ? [] : [value], items: BI.deepClone(o.items) }); @@ -79,7 +81,7 @@ BI.TextValueDownListCombo = BI.inherit(BI.Widget, { setValue: function (v) { v = this._digest(v); this.combo.setValue([v]); - this.trigger.setValue(v); + this.trigger?.setValue(v); }, getValue: function () { @@ -94,4 +96,4 @@ BI.TextValueDownListCombo = BI.inherit(BI.Widget, { } }); BI.TextValueDownListCombo.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.text_value_down_list_combo", BI.TextValueDownListCombo); \ No newline at end of file +BI.shortcut("bi.text_value_down_list_combo", BI.TextValueDownListCombo); From 7146cbf1293ef6cac2b9f728d217fc88762e7a55 Mon Sep 17 00:00:00 2001 From: data Date: Fri, 4 Nov 2022 16:44:33 +0800 Subject: [PATCH 26/68] auto upgrade version to 2.0.20221104164422 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8d5f2830e..e37469887 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221104135556", + "version": "2.0.20221104164422", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From 12ae22ad8bb3fd9e34bb4c4f5e35cbe3ee9ec4c0 Mon Sep 17 00:00:00 2001 From: data Date: Fri, 4 Nov 2022 17:14:51 +0800 Subject: [PATCH 27/68] auto upgrade version to 2.0.20221104171438 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e37469887..2763717c5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221104164422", + "version": "2.0.20221104171438", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From 0e2b432b78c56d4b0829b6523d35a51ad611732f Mon Sep 17 00:00:00 2001 From: guy Date: Fri, 4 Nov 2022 19:40:39 +0800 Subject: [PATCH 28/68] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=B8=80=E4=B8=8B?= =?UTF-8?q?=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/widget/date/calendar/combo.month.date.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/widget/date/calendar/combo.month.date.js b/src/widget/date/calendar/combo.month.date.js index 82068ceac..aac5a7fc0 100644 --- a/src/widget/date/calendar/combo.month.date.js +++ b/src/widget/date/calendar/combo.month.date.js @@ -48,6 +48,7 @@ BI.MonthDateCombo = BI.inherit(BI.Trigger, { el: { type: "bi.vertical", hgap: 6, + vgap: 5, items: [this.popup] } } From 1714e340a0d20fc0788986b7f5592f17de2dde28 Mon Sep 17 00:00:00 2001 From: data Date: Sat, 5 Nov 2022 20:26:01 +0800 Subject: [PATCH 29/68] auto upgrade version to 2.0.20221105202549 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2763717c5..3ae40e3cd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221104171438", + "version": "2.0.20221105202549", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From fcd96709d9935480e6dfe954241fed74a415b953 Mon Sep 17 00:00:00 2001 From: Sylar Date: Fri, 4 Nov 2022 14:51:55 +0800 Subject: [PATCH 30/68] =?UTF-8?q?REPORT-83708=20fix:=20=E5=88=9B=E5=BB=BAB?= =?UTF-8?q?lob=E6=97=B6=E6=8C=87=E5=AE=9A=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/webpack-fui-worker-plugin/worker-loader.js | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/webpack-fui-worker-plugin/worker-loader.js b/plugins/webpack-fui-worker-plugin/worker-loader.js index 2c19eecce..d07756e01 100644 --- a/plugins/webpack-fui-worker-plugin/worker-loader.js +++ b/plugins/webpack-fui-worker-plugin/worker-loader.js @@ -116,6 +116,7 @@ function loader() { // 插入代码的转译和压缩由主构建配置的 babel/ts loader 处理, 不需要 worker-worker 来处理 // 添加 @ts-nocheck 避免 ts-check 报错 // 修复export const 下 const不会被转译的问题 + // safari浏览器下blob需指定type `// @ts-nocheck export default window.URL.createObjectURL(new Blob([${JSON.stringify(compilation.assets[entry].source())}], { type: 'text/javascript' })); ` From 2256e0c1a34e1cfc3798640335ae5fa4de5cddcc Mon Sep 17 00:00:00 2001 From: data Date: Mon, 7 Nov 2022 12:16:47 +0800 Subject: [PATCH 31/68] auto upgrade version to 2.0.20221107121634 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3ae40e3cd..ebe1185ea 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221105202549", + "version": "2.0.20221107121634", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From 0faf129968ab4468cc10b85c37a65b511061c5f3 Mon Sep 17 00:00:00 2001 From: zsmj Date: Mon, 7 Nov 2022 20:08:27 +0800 Subject: [PATCH 32/68] =?UTF-8?q?KERNEL-13349=20feat:=20=E5=A4=8D=E9=80=89?= =?UTF-8?q?=E4=B8=8B=E6=8B=89=E6=A1=86checkselectedswitcher=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../multitree/trigger/multi.tree.button.checkselected.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/widget/multitree/trigger/multi.tree.button.checkselected.js b/src/widget/multitree/trigger/multi.tree.button.checkselected.js index 59522d784..5efd65b2e 100644 --- a/src/widget/multitree/trigger/multi.tree.button.checkselected.js +++ b/src/widget/multitree/trigger/multi.tree.button.checkselected.js @@ -19,8 +19,8 @@ BI.MultiTreeCheckSelectedButton = BI.inherit(BI.Single, { this.indicator = BI.createWidget({ type: "bi.icon_button", cls: "check-font trigger-check-selected icon-size-12", - width: 15, - height: 15, + width: 16, + height: 16, stopPropagation: true }); @@ -31,7 +31,6 @@ BI.MultiTreeCheckSelectedButton = BI.inherit(BI.Single, { hgap: 4, text: BI.i18nText("BI-Check_Selected"), textAlign: "center", - textHeight: 15 }); this.checkSelected.on(BI.Controller.EVENT_CHANGE, function () { self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); @@ -65,4 +64,4 @@ BI.MultiTreeCheckSelectedButton = BI.inherit(BI.Single, { }); BI.MultiTreeCheckSelectedButton.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.multi_tree_check_selected_button", BI.MultiTreeCheckSelectedButton); \ No newline at end of file +BI.shortcut("bi.multi_tree_check_selected_button", BI.MultiTreeCheckSelectedButton); From cb56f7ea1eeb0b4897a9c94040bb8e611b1646a6 Mon Sep 17 00:00:00 2001 From: data Date: Tue, 8 Nov 2022 10:38:14 +0800 Subject: [PATCH 33/68] auto upgrade version to 2.0.20221108103803 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ebe1185ea..1cf189554 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221107121634", + "version": "2.0.20221108103803", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From a6eb62fbb70255cdd676127c1d2c1c167aea0d95 Mon Sep 17 00:00:00 2001 From: data Date: Tue, 8 Nov 2022 10:54:42 +0800 Subject: [PATCH 34/68] auto upgrade version to 2.0.20221108105434 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1cf189554..28e42b317 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221108103803", + "version": "2.0.20221108105434", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From 5ba6f57f1d3ce14f8dfbbae1f6bb778f00978533 Mon Sep 17 00:00:00 2001 From: data Date: Tue, 8 Nov 2022 16:24:51 +0800 Subject: [PATCH 35/68] auto upgrade version to 2.0.20221108162444 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 28e42b317..3425c2683 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221108105434", + "version": "2.0.20221108162444", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From 5fd597275e33cd0e8ffbcbfbee101d03a62c31c7 Mon Sep 17 00:00:00 2001 From: zsmj Date: Wed, 9 Nov 2022 16:16:11 +0800 Subject: [PATCH 36/68] =?UTF-8?q?=E6=97=A0JIRA=20revert=20commit=20c45e768?= =?UTF-8?q?,=20=E4=B8=8D=E6=98=AF=E5=AE=9E=E6=97=B6=E6=A0=A1=E9=AA=8C?= =?UTF-8?q?=E7=9A=84=E4=B8=80=E5=BE=8B=E4=B8=8D=E8=AE=B8=E7=94=A8=E6=B0=94?= =?UTF-8?q?=E6=B3=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/single/editor/editor.js | 5 ----- src/widget/editor/editor.text.js | 4 ---- 2 files changed, 9 deletions(-) diff --git a/src/base/single/editor/editor.js b/src/base/single/editor/editor.js index 95e863430..ac9e779e9 100644 --- a/src/base/single/editor/editor.js +++ b/src/base/single/editor/editor.js @@ -344,11 +344,6 @@ BI.Editor = BI.inherit(BI.Single, { return this.editor.isValid(); }, - setValid: function (b) { - this.editor.setValid(b); - this._checkError(); - }, - destroyed: function () { BI.Bubbles.remove(this.getName()); }, diff --git a/src/widget/editor/editor.text.js b/src/widget/editor/editor.text.js index 4525a2a7b..19f51fd73 100644 --- a/src/widget/editor/editor.text.js +++ b/src/widget/editor/editor.text.js @@ -138,10 +138,6 @@ BI.TextEditor = BI.inherit(BI.Widget, { return this.editor.isValid(); }, - setValid: function (b) { - this.editor.setValid(b); - }, - setValue: function (v) { this.editor.setValue(v); }, From ebaf1dad8a7257d8e44a19e8026d6fb0a663519c Mon Sep 17 00:00:00 2001 From: Treecat Date: Wed, 9 Nov 2022 17:43:24 +0800 Subject: [PATCH 37/68] =?UTF-8?q?REPORT-83562=20feat:=20=E6=97=A5=E6=9C=9F?= =?UTF-8?q?=E6=8E=A7=E4=BB=B6=E9=9D=9E=E6=9C=AC=E6=9C=88=E7=9A=84=E6=97=A5?= =?UTF-8?q?=E6=9C=9F=E5=8F=AF=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/case/calendar/calendar.js | 3 ++- src/less/case/calendar/calendar.less | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 src/less/case/calendar/calendar.less diff --git a/src/case/calendar/calendar.js b/src/case/calendar/calendar.js index bfd76e2b4..88ccf198a 100644 --- a/src/case/calendar/calendar.js +++ b/src/case/calendar/calendar.js @@ -161,7 +161,8 @@ BI.Calendar = BI.inherit(BI.Widget, { once: false, forceSelected: true, value: o.year + "-" + month + "-" + td.text, - disabled: td.lastMonth || td.nextMonth || td.disabled, + disabled: td.disabled, + cls: td.lastMonth || td.nextMonth ? "not-current-month-day": "", lgap: 2, rgap: 2, tgap: 4, diff --git a/src/less/case/calendar/calendar.less b/src/less/case/calendar/calendar.less new file mode 100644 index 000000000..388bcf9e3 --- /dev/null +++ b/src/less/case/calendar/calendar.less @@ -0,0 +1,5 @@ +@import "../../index.less"; + +.bi-calendar-date-item.not-current-month-day { + color: @color-bi-text-disabled-button !important; +} \ No newline at end of file From f9b6a56b102eeedf4d6ad63a76ec81b6a0c670d4 Mon Sep 17 00:00:00 2001 From: zsmj Date: Wed, 9 Nov 2022 19:30:22 +0800 Subject: [PATCH 38/68] =?UTF-8?q?=E6=97=A0JIRA=20fix:=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?tape=E5=B8=83=E5=B1=80=20NaN=E7=9A=84=E5=9C=BA=E6=99=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/wrapper/layout/layout.tape.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/wrapper/layout/layout.tape.js b/src/core/wrapper/layout/layout.tape.js index 185af813d..9303f5865 100644 --- a/src/core/wrapper/layout/layout.tape.js +++ b/src/core/wrapper/layout/layout.tape.js @@ -217,7 +217,7 @@ BI.VTapeLayout = BI.inherit(BI.Layout, { top: self._optimiseGap(top[i] + self._optimiseItemTgap(item) + self._optimiseItemVgap(item) + o.vgap + o.tgap) }); - if (rowSize === "" || rowSize === "fill") { + if (BI.isNull(rowSize) || rowSize === "" || rowSize === "fill") { return true; } }); @@ -235,7 +235,7 @@ BI.VTapeLayout = BI.inherit(BI.Layout, { bottom: self._optimiseGap(bottom[i] + self._optimiseItemBgap(item) + self._optimiseItemVgap(item) + o.vgap + o.bgap) }); - if (rowSize === "" || rowSize === "fill") { + if (BI.isNull(rowSize) || rowSize === "" || rowSize === "fill") { return true; } }); From 638f3f67d1e8e920c1481916506ff46419c56ec6 Mon Sep 17 00:00:00 2001 From: data Date: Wed, 9 Nov 2022 19:38:48 +0800 Subject: [PATCH 39/68] auto upgrade version to 2.0.20221109193835 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3425c2683..187ba3f22 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221108162444", + "version": "2.0.20221109193835", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From 58a9abd7d83126e840bc3276a34abfcb6cb074c6 Mon Sep 17 00:00:00 2001 From: data Date: Thu, 10 Nov 2022 10:16:36 +0800 Subject: [PATCH 40/68] auto upgrade version to 2.0.20221110101625 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 187ba3f22..212bbb8ce 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221109193835", + "version": "2.0.20221110101625", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From 9ebdad06fd19dfe33d897d406000e10ed139ef8b Mon Sep 17 00:00:00 2001 From: Treecat Date: Thu, 10 Nov 2022 15:51:24 +0800 Subject: [PATCH 41/68] =?UTF-8?q?KERNEL-13489=20fix:=20=E8=AE=A9Button?= =?UTF-8?q?=E6=B2=A1=E6=9C=89icon=E7=9A=84=E6=83=85=E5=86=B5=E4=B8=8B?= =?UTF-8?q?=E5=8F=AA=E6=B8=B2=E6=9F=93=E4=B8=80=E4=B8=AA=20label?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/single/button/buttons/button.js | 116 +++++++++++++---------- 1 file changed, 66 insertions(+), 50 deletions(-) diff --git a/src/base/single/button/buttons/button.js b/src/base/single/button/buttons/button.js index 39cfffda3..2e7a75936 100644 --- a/src/base/single/button/buttons/button.js +++ b/src/base/single/button/buttons/button.js @@ -71,6 +71,35 @@ render: function () { var o = this.options, self = this; + // bi.center_adapt 作用:让 hgap 不影响 iconGap。 + BI.createWidget({ + type: "bi.center_adapt", + horizontalAlign: o.textAlign, + element: this, + ref(ref) { + self.containerRef = ref; + }, + hgap: o.hgap, + vgap: o.vgap, + items: self.generateItems() + }); + + // 如果 options 对应的属性为 true 则给元素添加 class + var classArr = ["block", "clear", "ghost", "plain", "loading", "light"]; + BI.each(classArr, function (_, clz) { + if (BI.get(o, clz) === true) { + self.element.addClass(clz); + } + }); + + if (o.minWidth > 0) { + this.element.css({ "min-width": BI.pixFormat(o.minWidth) }); + } + }, + + generateItems(defaultRenderIcon) { + var o = this.options; + // 由于button默认情况下有个边框,所以要主动算行高 var lineHeight, textHeight = o.textHeight; var hasBorder = false @@ -90,7 +119,32 @@ } } - var iconInvisible = !o.loading && !o.iconCls && !o.icon; + var iconInvisible = !(o.loading || o.iconCls || o.icon || defaultRenderIcon); + + var textWidth = o.textWidth; + if (BI.isNull(o.textWidth)) { + textWidth = (o.minWidth > 0 && o.width < o.minWidth) ? o.minWidth : o.width; + textWidth -= (o.hgap * 2 + o.iconGap) + textWidth -= iconInvisible || isVertical(o.iconPosition) ? 0 : this._const.iconWidth + } + this.text = BI.createWidget({ + type: "bi.label", + text: o.text, + whiteSpace: o.whiteSpace, + textAlign: o.textAlign, + textWidth: textWidth, + textHeight: BI.toPix(textHeight, hasBorder ? 2 : 0), + height: BI.toPix(lineHeight, hasBorder ? 2 : 0), + value: o.value, + title: null, + }); + + if (iconInvisible) { + return [this.text] + } + + this._iconRendered = true; + if (BI.isPlainObject(o.icon) && !o.loading) { this.icon = BI.createWidget(o.icon); } else { @@ -107,64 +161,24 @@ }); } - // 用户可能设置的 width 小于按钮的最小宽度 - var actualWidth = (o.minWidth > 0 && o.width < o.minWidth) ? o.minWidth : o.width; - var textWidth = iconInvisible && o.width ? actualWidth - o.hgap * 2 : null; - if (BI.isNotNull(o.textWidth)) { - // textWidth 需要减去图标 - textWidth = o.textWidth - (iconInvisible || isVertical(o.iconPosition) ? 0 : this._const.iconWidth); - } - this.text = BI.createWidget({ - type: "bi.label", - text: o.text, - whiteSpace: o.whiteSpace, - textAlign: o.textAlign, - textWidth: textWidth, - textHeight: BI.toPix(textHeight, hasBorder ? 2 : 0), - height: BI.toPix(lineHeight, hasBorder ? 2 : 0), - value: o.value, - title: null, - }); - var layoutType = "bi.horizontal"; var gapContainer = { lgap: o.iconPosition === "left" && o.text ? o.iconGap : 0, rgap: o.iconPosition === "right" ? o.iconGap : 0, tgap: o.iconPosition === "top" ? o.iconGap : 0, bgap: o.iconPosition === "bottom" ? o.iconGap : 0, }; - var items = [this.icon, BI.extend({el: this.text}, gapContainer)]; - if (isVertical(o.iconPosition)) { - layoutType = "bi.vertical"; - } + + var items = [this.icon, BI.extend({ el: this.text }, gapContainer)]; if (o.iconPosition === "right" || o.iconPosition === "bottom") { - items = [BI.extend({el: this.text}, gapContainer), this.icon]; + items.reverse(); } - // bi.center_adapt 作用:让 hgap 不影响 iconGap。 - BI.createWidget({ - type: "bi.center_adapt", - horizontalAlign: o.textAlign, - element: this, - hgap: o.hgap, - vgap: o.vgap, - items: [{ - type: layoutType, - horizontalAlign: "center", - verticalAlign: "middle", - items: items, - }], - }); - - var classArr = ["block", "clear", "ghost", "plain", "loading", "light"]; - // 如果 options 对应的属性为 true 则给元素添加 class - BI.each(classArr, function (_, clz) { - if (BI.get(o, clz) === true) { - self.element.addClass(clz); - } - }); - if (o.minWidth > 0) { - this.element.css({ "min-width": BI.pixFormat(o.minWidth) }); - } + return [{ + type: isVertical(o.iconPosition) ? "bi.vertical" : "bi.horizontal", + horizontalAlign: "center", + verticalAlign: "middle", + items, + }]; }, doClick: function () { @@ -194,6 +208,7 @@ loading: function () { this._loading = true; this.element.addClass("loading"); + !this._iconRendered && this.containerRef.populate(this.generateItems(true)); if (this.icon.loading) { this.icon.loading(); } else { @@ -228,6 +243,7 @@ setIcon: function (cls) { var o = this.options; + !this._iconRendered && this.containerRef.populate(this.generateItems(true)); if (this.icon && o.iconCls !== cls) { this.icon.element.removeClass(o.iconCls).addClass(cls); o.iconCls = cls; From 0572011a85cd80f9d745693ea84c169f5c93f660 Mon Sep 17 00:00:00 2001 From: Treecat Date: Thu, 10 Nov 2022 16:42:31 +0800 Subject: [PATCH 42/68] =?UTF-8?q?KERNEL-13489=20fix:=20button=20=E7=9A=84?= =?UTF-8?q?=E7=BC=A9=E5=86=99=E6=94=B9=E6=88=90=E7=AE=AD=E5=A4=B4=E5=87=BD?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/single/button/buttons/button.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/base/single/button/buttons/button.js b/src/base/single/button/buttons/button.js index 2e7a75936..a06f23191 100644 --- a/src/base/single/button/buttons/button.js +++ b/src/base/single/button/buttons/button.js @@ -76,7 +76,7 @@ type: "bi.center_adapt", horizontalAlign: o.textAlign, element: this, - ref(ref) { + ref: (ref) => { self.containerRef = ref; }, hgap: o.hgap, @@ -167,7 +167,7 @@ tgap: o.iconPosition === "top" ? o.iconGap : 0, bgap: o.iconPosition === "bottom" ? o.iconGap : 0, }; - + var items = [this.icon, BI.extend({ el: this.text }, gapContainer)]; if (o.iconPosition === "right" || o.iconPosition === "bottom") { items.reverse(); From 30c1955d88d2fdc4782e3a2da51bca4b106a072d Mon Sep 17 00:00:00 2001 From: data Date: Thu, 10 Nov 2022 17:56:15 +0800 Subject: [PATCH 43/68] auto upgrade version to 2.0.20221110175602 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 212bbb8ce..52d9823d0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221110101625", + "version": "2.0.20221110175602", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From c5e1c6e8f3aad7661b4d0e30a8e04ecaeaeffade Mon Sep 17 00:00:00 2001 From: data Date: Fri, 11 Nov 2022 09:06:36 +0800 Subject: [PATCH 44/68] auto upgrade version to 2.0.20221111090621 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 52d9823d0..f4fe5b8be 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221110175602", + "version": "2.0.20221111090621", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From a46cab92bbaa758074672efad5e149a320ff77d9 Mon Sep 17 00:00:00 2001 From: data Date: Fri, 11 Nov 2022 14:57:15 +0800 Subject: [PATCH 45/68] auto upgrade version to 2.0.20221111145656 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f4fe5b8be..326f247ab 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221111090621", + "version": "2.0.20221111145656", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From 24bf52614bb01de5b2ee34191eb1806f87a87e16 Mon Sep 17 00:00:00 2001 From: guy Date: Fri, 11 Nov 2022 16:40:35 +0800 Subject: [PATCH 46/68] =?UTF-8?q?KERNEL-13158:=20=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/less/base/segment/button.segment.less | 2 +- src/less/base/segment/segment.less | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/less/base/segment/button.segment.less b/src/less/base/segment/button.segment.less index 451d65f33..5fdd04264 100644 --- a/src/less/base/segment/button.segment.less +++ b/src/less/base/segment/button.segment.less @@ -10,7 +10,7 @@ .line-segment-button-line { .transition(background 0.3s); } - &.active, &:active { + &.active, &:active:not(.disabled) { font-weight: bold; } } diff --git a/src/less/base/segment/segment.less b/src/less/base/segment/segment.less index f106ddc75..69aa01dbc 100644 --- a/src/less/base/segment/segment.less +++ b/src/less/base/segment/segment.less @@ -18,6 +18,13 @@ border-color: @color-bi-split-disabled-segment; } } +.bi-linear-segment { + &.disabled { + .bi-high-light-background { + background-color: @color-bi-background-dark-gray !important; + } + } +} .bi-theme-dark { .bi-segment { From 5b9b1cd03ceb96c03bdfca91ab5050ae32e20e72 Mon Sep 17 00:00:00 2001 From: data Date: Fri, 11 Nov 2022 19:54:10 +0800 Subject: [PATCH 47/68] auto upgrade version to 2.0.20221111195401 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 326f247ab..492da6569 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221111145656", + "version": "2.0.20221111195401", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From 4bd2efd4c83e79dbfe8492772d337e4dc954672e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dailer-=E5=88=98=E8=8D=A3=E6=AD=86?= Date: Mon, 14 Nov 2022 20:19:41 +0800 Subject: [PATCH 48/68] =?UTF-8?q?=E6=97=A0jira=20number-counter=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/less/widget/multiselect/trigger/button.checkselected.less | 1 - 1 file changed, 1 deletion(-) diff --git a/src/less/widget/multiselect/trigger/button.checkselected.less b/src/less/widget/multiselect/trigger/button.checkselected.less index b02c76e80..4a36315b0 100644 --- a/src/less/widget/multiselect/trigger/button.checkselected.less +++ b/src/less/widget/multiselect/trigger/button.checkselected.less @@ -2,7 +2,6 @@ .bi-multi-select-check-selected-button { z-index: 1; - min-width: 16px; .border-radius(50%); &:active { From a2a247237cc1f8db002ef1cd0196b5bab2546696 Mon Sep 17 00:00:00 2001 From: data Date: Mon, 14 Nov 2022 22:13:18 +0800 Subject: [PATCH 49/68] auto upgrade version to 2.0.20221114221310 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 492da6569..998f59bfd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221111195401", + "version": "2.0.20221114221310", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From 0ac1e8483ca229410b2daa20564c9da6f4a0f3c9 Mon Sep 17 00:00:00 2001 From: "Zhenfei.Li" Date: Tue, 15 Nov 2022 11:44:55 +0800 Subject: [PATCH 50/68] =?UTF-8?q?KERNEL-13521=20refactor:=20segment?= =?UTF-8?q?=E4=BD=BF=E7=94=A8grid=E5=B8=83=E5=B1=80=EF=BC=8C=E4=BD=BF?= =?UTF-8?q?=E5=85=B6=E9=BB=98=E8=AE=A4=E4=BD=BF=E7=94=A8=E6=9C=80=E9=95=BF?= =?UTF-8?q?=E9=A1=B9=E5=AE=BD=E5=BA=A6=E7=AD=89=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- demo/js/case/demo.segment.js | 8 ++++---- src/case/segment/segment.js | 11 +++++------ src/less/base/segment/segment.less | 2 +- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/demo/js/case/demo.segment.js b/demo/js/case/demo.segment.js index 8831c11f3..f6b2b0068 100644 --- a/demo/js/case/demo.segment.js +++ b/demo/js/case/demo.segment.js @@ -5,20 +5,20 @@ Demo.Func = BI.inherit(BI.Widget, { render: function () { BI.createWidget({ - type: "bi.vertical", + type: "bi.horizontal", element: this, vgap: 20, hgap: 30, items: [{ type: "bi.segment", items: [{ - text: "1", + text: "较长的选项1", value: 1 }, { - text: "2", + text: "选项2", value: 2 }, { - text: "3", + text: "选项3", value: 3 }] }] diff --git a/src/case/segment/segment.js b/src/case/segment/segment.js index dac7754d1..ef52ae24a 100644 --- a/src/case/segment/segment.js +++ b/src/case/segment/segment.js @@ -23,13 +23,12 @@ BI.Segment = BI.inherit(BI.Widget, { items: BI.createItems(o.items, { type: "bi.segment_button", height: BI.toPix(o.height, 2), - whiteSpace: o.whiteSpace + whiteSpace: o.whiteSpace, }), - layout: [ - { - type: "bi.center" - } - ] + layouts: o.layouts || [{ + type: "bi.table", + columnSize: BI.makeArrayByArray(o.items, "fill"), + }], }); this.buttonGroup.on(BI.Controller.EVENT_CHANGE, function () { self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); diff --git a/src/less/base/segment/segment.less b/src/less/base/segment/segment.less index 69aa01dbc..74ffe2f16 100644 --- a/src/less/base/segment/segment.less +++ b/src/less/base/segment/segment.less @@ -7,7 +7,7 @@ border-top: 1px solid @color-bi-split-segment; border-bottom: 1px solid @color-bi-split-segment; } - & > .first-element{ + & > .first-element, & > .first-row{ border-left: 1px solid @color-bi-split-segment; .border-corner-radius(2px,0px,0px,2px) } From b5bdace1fbbd6ee371dac0708a62e5240d21368c Mon Sep 17 00:00:00 2001 From: "Zhenfei.Li" Date: Tue, 15 Nov 2022 17:17:06 +0800 Subject: [PATCH 51/68] =?UTF-8?q?KERNEL-13521=20refactor:=20segment?= =?UTF-8?q?=E8=B0=83=E6=95=B4&=E8=A1=8C=E5=88=97=E5=B8=83=E5=B1=80?= =?UTF-8?q?=E7=9A=84=E7=B1=BB=E5=90=8D=E6=96=B9=E6=B3=95=E6=8A=BD=E5=88=B0?= =?UTF-8?q?layout=E4=B8=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- demo/js/case/demo.segment.js | 16 +++--- src/case/segment/segment.js | 12 ++--- src/core/wrapper/layout.js | 21 +++++++- src/core/wrapper/layout/layout.division.js | 44 ++++++--------- src/core/wrapper/layout/layout.grid.js | 31 ++++------- src/core/wrapper/layout/layout.table.js | 62 +++++++++------------- src/core/wrapper/layout/layout.window.js | 39 +++++--------- src/less/base/segment/segment.less | 8 +-- 8 files changed, 101 insertions(+), 132 deletions(-) diff --git a/demo/js/case/demo.segment.js b/demo/js/case/demo.segment.js index f6b2b0068..946c5d952 100644 --- a/demo/js/case/demo.segment.js +++ b/demo/js/case/demo.segment.js @@ -1,6 +1,6 @@ Demo.Func = BI.inherit(BI.Widget, { props: { - baseCls: "demo-func" + baseCls: "demo-func", }, render: function () { @@ -13,16 +13,16 @@ Demo.Func = BI.inherit(BI.Widget, { type: "bi.segment", items: [{ text: "较长的选项1", - value: 1 + value: 1, }, { text: "选项2", - value: 2 + value: 2, }, { text: "选项3", - value: 3 - }] - }] + value: 3, + }], + }], }); - } + }, }); -BI.shortcut("demo.segment", Demo.Func); \ No newline at end of file +BI.shortcut("demo.segment", Demo.Func); diff --git a/src/case/segment/segment.js b/src/case/segment/segment.js index ef52ae24a..3f323ffb6 100644 --- a/src/case/segment/segment.js +++ b/src/case/segment/segment.js @@ -10,7 +10,7 @@ BI.Segment = BI.inherit(BI.Widget, { return BI.extend(BI.Segment.superclass._defaultConfig.apply(this, arguments), { baseCls: "bi-segment", items: [], - height: 24 + height: 24, }); }, _init: function () { @@ -20,12 +20,12 @@ BI.Segment = BI.inherit(BI.Widget, { element: this, type: "bi.button_group", value: o.value, - items: BI.createItems(o.items, { + items: [BI.createItems(o.items, { type: "bi.segment_button", height: BI.toPix(o.height, 2), whiteSpace: o.whiteSpace, - }), - layouts: o.layouts || [{ + })], + layouts: [{ type: "bi.table", columnSize: BI.makeArrayByArray(o.items, "fill"), }], @@ -57,7 +57,7 @@ BI.Segment = BI.inherit(BI.Widget, { getValue: function () { return this.buttonGroup.getValue(); - } + }, }); BI.Segment.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.segment", BI.Segment); \ No newline at end of file +BI.shortcut("bi.segment", BI.Segment); diff --git a/src/core/wrapper/layout.js b/src/core/wrapper/layout.js index 8ca284d30..d2926385d 100644 --- a/src/core/wrapper/layout.js +++ b/src/core/wrapper/layout.js @@ -16,7 +16,7 @@ BI.Layout = BI.inherit(BI.Widget, { scrolly: false, // true, false items: [], innerHgap: 0, - innerVgap: 0 + innerVgap: 0, }; }, @@ -727,6 +727,25 @@ BI.Layout = BI.inherit(BI.Widget, { }); }, + getRowColumnCls: function (rowIndex, colIndex, lastRowIndex, lastColIndex) { + var cls = ""; + if (rowIndex === 0) { + cls += " first-row"; + } else if (rowIndex === lastRowIndex) { + cls += " last-row"; + } + if (colIndex === 0) { + cls += " first-col"; + } else if (colIndex === lastColIndex) { + cls += " last-col"; + } + BI.isOdd(rowIndex + 1) ? (cls += " odd-row") : (cls += " even-row"); + BI.isOdd(colIndex + 1) ? (cls += " odd-col") : (cls += " even-col"); + cls += " center-element"; + + return cls; + }, + removeWidget: function (nameOrWidget) { var removeIndex, self = this; if (BI.isWidget(nameOrWidget)) { diff --git a/src/core/wrapper/layout/layout.division.js b/src/core/wrapper/layout/layout.division.js index 988d118be..307166283 100644 --- a/src/core/wrapper/layout/layout.division.js +++ b/src/core/wrapper/layout/layout.division.js @@ -28,44 +28,31 @@ BI.DivisionLayout = BI.inherit(BI.Layout, { }, stroke: function (items) { - var o = this.options; + var o = this.options, self = this; var rows = o.rows || o.items.length, columns = o.columns || ((o.items[0] && o.items[0].length) | 0); var map = BI.makeArray(rows), widths = {}, heights = {}; - function firstElement (item, row, col) { - if (row === 0) { - item.addClass("first-row"); - } - if (col === 0) { - item.addClass("first-col"); - } - item.addClass(BI.isOdd(row + 1) ? "odd-row" : "even-row"); - item.addClass(BI.isOdd(col + 1) ? "odd-col" : "even-col"); - item.addClass("center-element"); + function firstElement (item, cls) { + item.addClass(cls); + + return item; } - function firstObject (item, row, col) { - var cls = ""; - if (row === 0) { - cls += " first-row"; - } - if (col === 0) { - cls += " first-col"; - } - BI.isOdd(row + 1) ? (cls += " odd-row") : (cls += " even-row"); - BI.isOdd(col + 1) ? (cls += " odd-col") : (cls += " even-col"); - item.cls = (item.cls || "") + cls + " center-element"; + function firstObject (item, cls) { + item.cls = (item.cls || "") + cls; + + return item; } - function first (item, row, col) { + function first (item, cls) { if (item instanceof BI.Widget) { - firstElement(item.element, row, col); + firstElement(item.element, cls); } else if (item.el instanceof BI.Widget) { - firstElement(item.el.element, row, col); + firstElement(item.el.element, cls); } else if (item.el) { - firstObject(item.el, row, col); + firstObject(item.el, cls); } else { - firstObject(item, row, col); + firstObject(item, cls); } } @@ -79,6 +66,7 @@ BI.DivisionLayout = BI.inherit(BI.Layout, { heights[j] = (heights[j] || 0) + item.height; map[i][j] = el; }); + return; } widths[item.row] = (widths[item.row] || 0) + item.width; @@ -106,7 +94,7 @@ BI.DivisionLayout = BI.inherit(BI.Layout, { if (j == o.columns - 1) { w.element.css({right: "0%"}); } - first(w, i, j); + first(w, self.getRowColumnCls(i, j, rows - 1, columns - 1)); totalW += map[i][j].width; } } diff --git a/src/core/wrapper/layout/layout.grid.js b/src/core/wrapper/layout/layout.grid.js index a81c31681..53e4cf00b 100644 --- a/src/core/wrapper/layout/layout.grid.js +++ b/src/core/wrapper/layout/layout.grid.js @@ -36,29 +36,16 @@ BI.GridLayout = BI.inherit(BI.Layout, { els[i] = []; } - function firstElement (item, row, col) { - if (row === 0) { - item.addClass("first-row"); - } - if (col === 0) { - item.addClass("first-col"); - } - item.addClass(BI.isOdd(row + 1) ? "odd-row" : "even-row"); - item.addClass(BI.isOdd(col + 1) ? "odd-col" : "even-col"); - item.addClass("center-element"); + function firstElement (item, cls) { + item.addClass(cls); + + return item; } - function firstObject (item, row, col) { - var cls = ""; - if (row === 0) { - cls += " first-row"; - } - if (col === 0) { - cls += " first-col"; - } - BI.isOdd(row + 1) ? (cls += " odd-row") : (cls += " even-row"); - BI.isOdd(col + 1) ? (cls += " odd-col") : (cls += " even-col"); - item.cls = (item.cls || "") + cls + " center-element"; + function firstObject (item, cls) { + item.cls = (item.cls || "") + cls; + + return item; } function first (item, row, col) { @@ -89,7 +76,7 @@ BI.GridLayout = BI.inherit(BI.Layout, { type: "bi.layout" }); } - first(els[i][j], i, j); + first(els[i][j], self.getRowColumnCls(i, j, rows - 1, columns - 1)); els[i][j].element.css({ position: "absolute", top: height * i + "%", diff --git a/src/core/wrapper/layout/layout.table.js b/src/core/wrapper/layout/layout.table.js index 6352672c2..51d6eeb14 100644 --- a/src/core/wrapper/layout/layout.table.js +++ b/src/core/wrapper/layout/layout.table.js @@ -16,7 +16,7 @@ BI.TableLayout = BI.inherit(BI.Layout, { // rowSize: 30, // or [30,30,30] hgap: 0, vgap: 0, - items: [] + items: [], }); }, render: function () { @@ -45,57 +45,43 @@ BI.TableLayout = BI.inherit(BI.Layout, { return self._optimiseGap(size); }).join(" ") : BI.range(o.items.length).fill(this._optimiseGap(o.rowSize)).join(" "), "grid-row-gap": this._optimiseGap(o.vgap), - "grid-column-gap": this._optimiseGap(o.hgap) + "grid-column-gap": this._optimiseGap(o.hgap), }); } + return { type: "bi.default", ref: function (_ref) { self.layout = _ref; }, - items: this._formatItems(items) + items: this._formatItems(items), }; }, _formatItems: function (items) { - var o = this.options; + var o = this.options, self = this; + + function firstElement (item, cls) { + item.addClass(cls); - function firstElement (item, row, col) { - if (row === 0) { - item.addClass("first-row"); - } - if (col === 0) { - item.addClass("first-col"); - } - item.addClass(BI.isOdd(row + 1) ? "odd-row" : "even-row"); - item.addClass(BI.isOdd(col + 1) ? "odd-col" : "even-col"); - item.addClass("center-element"); return item; } - function firstObject (item, row, col) { - var cls = ""; - if (row === 0) { - cls += " first-row"; - } - if (col === 0) { - cls += " first-col"; - } - BI.isOdd(row + 1) ? (cls += " odd-row") : (cls += " even-row"); - BI.isOdd(col + 1) ? (cls += " odd-col") : (cls += " even-col"); - item.cls = (item.cls || "") + cls + " center-element"; + function firstObject (item, cls) { + item.cls = (item.cls || "") + cls; + return item; } - function first (item, row, col) { + function first (item, cls) { if (item instanceof BI.Widget) { - return firstElement(item.element, row, col); + return firstElement(item.element, cls); } else if (item.el instanceof BI.Widget) { - return firstElement(item.el.element, row, col); + return firstElement(item.el.element, cls); } else if (item.el) { - return firstObject(item.el, row, col); + return firstObject(item.el, cls); } else { - return firstObject(item, row, col); + return firstObject(item, cls); } } @@ -105,18 +91,20 @@ BI.TableLayout = BI.inherit(BI.Layout, { columnSize: ["fill"], horizontalAlign: o.horizontalAlign, verticalAlign: o.verticalAlign, - items: [BI.formatEL(item)] + items: [BI.formatEL(item)], }; } - return BI.reduce(items, function (row, result, i) { - return result.concat(BI.map(row, function (j, item) { + return BI.reduce(items, function (rowItems, result, rowIndex) { + return result.concat(BI.map(rowItems, function (colIndex, item) { + var cls = self.getRowColumnCls(rowIndex, colIndex, items.length - 1, rowItems.length - 1); if (BI.isEmpty(item)) { return first(wrapLayout({ - type: "bi.layout" - }), i, j); + type: "bi.layout", + }), cls); } - return first(wrapLayout(item), i, j); + + return first(wrapLayout(item), cls); })); }, []); }, @@ -127,6 +115,6 @@ BI.TableLayout = BI.inherit(BI.Layout, { populate: function (items) { this.layout.populate(this._formatItems(items)); - } + }, }); BI.shortcut("bi.table", BI.TableLayout); diff --git a/src/core/wrapper/layout/layout.window.js b/src/core/wrapper/layout/layout.window.js index c7d14623c..a6e6c6a26 100644 --- a/src/core/wrapper/layout/layout.window.js +++ b/src/core/wrapper/layout/layout.window.js @@ -35,7 +35,7 @@ BI.WindowLayout = BI.inherit(BI.Layout, { }, stroke: function (items) { - var o = this.options; + var o = this.options, self = this; if (BI.isNumber(o.rowSize)) { o.rowSize = BI.makeArray(o.items.length, 1 / o.items.length); } @@ -43,29 +43,16 @@ BI.WindowLayout = BI.inherit(BI.Layout, { o.columnSize = BI.makeArray(o.items[0].length, 1 / o.items[0].length); } - function firstElement (item, row, col) { - if (row === 0) { - item.addClass("first-row"); - } - if (col === 0) { - item.addClass("first-col"); - } - item.addClass(BI.isOdd(row + 1) ? "odd-row" : "even-row"); - item.addClass(BI.isOdd(col + 1) ? "odd-col" : "even-col"); - item.addClass("center-element"); + function firstElement (item, cls) { + item.addClass(cls); + + return item; } - function firstObject (item, row, col) { - var cls = ""; - if (row === 0) { - cls += " first-row"; - } - if (col === 0) { - cls += " first-col"; - } - BI.isOdd(row + 1) ? (cls += " odd-row") : (cls += " even-row"); - BI.isOdd(col + 1) ? (cls += " odd-col") : (cls += " even-col"); - item.cls = (item.cls || "") + cls + " center-element"; + function firstObject (item, cls) { + item.cls = (item.cls || "") + cls; + + return item; } function first (item, row, col) { @@ -109,7 +96,7 @@ BI.WindowLayout = BI.inherit(BI.Layout, { h = this._optimiseGap(o.rowSize[i]); } wi.element.css({top: t, height: h}); - first(wi, i, j); + first(wi, self.getRowColumnCls(i, j, o.rows - 1, o.columns - 1)); } if (!BI.isNumber(o.rowSize[i])) { break; @@ -127,7 +114,7 @@ BI.WindowLayout = BI.inherit(BI.Layout, { h = this._optimiseGap(o.rowSize[i]); } wi.element.css({bottom: b, height: h}); - first(wi, i, j); + first(wi, self.getRowColumnCls(i, j, o.rows - 1, o.columns - 1)); } if (!BI.isNumber(o.rowSize[i])) { break; @@ -145,7 +132,7 @@ BI.WindowLayout = BI.inherit(BI.Layout, { w = this._optimiseGap(o.columnSize[j]); } wi.element.css({left: l, width: w}); - first(wi, i, j); + first(wi, self.getRowColumnCls(i, j, o.rows - 1, o.columns - 1)); } if (!BI.isNumber(o.columnSize[j])) { break; @@ -163,7 +150,7 @@ BI.WindowLayout = BI.inherit(BI.Layout, { w = this._optimiseGap(o.columnSize[j]); } wi.element.css({right: r, width: w}); - first(wi, i, j); + first(wi, self.getRowColumnCls(i, j, o.rows - 1, o.columns - 1)); } if (!BI.isNumber(o.columnSize[j])) { break; diff --git a/src/less/base/segment/segment.less b/src/less/base/segment/segment.less index 74ffe2f16..08fec037a 100644 --- a/src/less/base/segment/segment.less +++ b/src/less/base/segment/segment.less @@ -7,14 +7,14 @@ border-top: 1px solid @color-bi-split-segment; border-bottom: 1px solid @color-bi-split-segment; } - & > .first-element, & > .first-row{ + & > .first-col{ border-left: 1px solid @color-bi-split-segment; .border-corner-radius(2px,0px,0px,2px) } - & > .last-element{ + & > .last-col{ .border-corner-radius(0px,2px,2px,0px) } - &.disabled > .center-element, &.disabled > .first-element{ + &.disabled > .center-element, &.disabled > .first-col{ border-color: @color-bi-split-disabled-segment; } } @@ -34,7 +34,7 @@ border-top: 1px solid @color-bi-split-segment-theme-dark; border-bottom: 1px solid @color-bi-split-segment-theme-dark; } - & > .first-element{ + & > .first-col{ border-left: 1px solid @color-bi-split-segment-theme-dark; } } From eeb4a183da525f278f05c725d5135e6a951cb40e Mon Sep 17 00:00:00 2001 From: iapyang Date: Tue, 15 Nov 2022 17:19:05 +0800 Subject: [PATCH 52/68] =?UTF-8?q?KERNEL-13523=20chore:=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E4=B8=8Bfui-cli=E5=91=BD=E4=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/cli/cli.js | 35 ++++++----------------------------- bin/cli/worker/cli.worker.js | 4 ++-- package.json | 8 ++++++-- 3 files changed, 14 insertions(+), 33 deletions(-) mode change 100644 => 100755 bin/cli/cli.js diff --git a/bin/cli/cli.js b/bin/cli/cli.js old mode 100644 new mode 100755 index 732fc1133..513024023 --- a/bin/cli/cli.js +++ b/bin/cli/cli.js @@ -1,44 +1,21 @@ #!/usr/bin/env node +const yargs = require('yargs/yargs'); +const { hideBin } = require('yargs/helpers'); const workerCmd = require('./worker/cli.worker'); -function getArgs (startIndex = 1) { - const args = {}; - process.argv - .slice(startIndex, process.argv.length) - .forEach(arg => { - // long arg - if (arg.slice(0, 2) === '--') { - const longArg = arg.split('='); - const longArgFlag = longArg[0].slice(2, longArg[0].length); - const longArgValue = longArg.length > 1 ? longArg[1] : true; - args[longArgFlag] = longArgValue; - // flags - } else if (arg[0] === '-') { - const flags = arg.slice(1, arg.length); - args[flags] = true; - } - }); +const argv = yargs(hideBin(process.argv)).argv; - return args; -} +const cmd = argv._[0]; const cmds = new Map([ ['worker', workerCmd], ]); -const baseCmd = 'fui-cli'; - -const startIndex = process.argv.findIndex(argv => argv.indexOf(baseCmd) !== -1); - -if (startIndex === -1) { - throw new Error(`Command ${baseCmd} not found in args`); -} - -const cmd = process.argv[startIndex + 1]; +if (!cmd) throw new Error('Command is undefined!'); if (cmds.has(cmd)) { - cmds.get(cmd)?.exec(getArgs(startIndex + 2)); + cmds.get(cmd)?.exec(argv); } else { throw new Error(`Command ${cmd} not supported`); } diff --git a/bin/cli/worker/cli.worker.js b/bin/cli/worker/cli.worker.js index 555c99cf0..b67513fbb 100644 --- a/bin/cli/worker/cli.worker.js +++ b/bin/cli/worker/cli.worker.js @@ -5,7 +5,7 @@ function first2UpperCase(str) { return str.toLowerCase().replace(/( |^)[a-z]/g, L => L.toUpperCase()); } -function scanAndCreate(structure, workerName, root = process.env.INIT_CWD) { +function scanAndCreate(structure, workerName, root) { Object.keys(structure) .forEach(name => { if (typeof structure[name] === 'object') { @@ -60,7 +60,7 @@ module.exports = { }, }; - scanAndCreate(structure, name); + scanAndCreate(structure, name, args.where ? path.resolve(args.where) : process.cwd()); }, }; diff --git a/package.json b/package.json index 998f59bfd..ebc245f87 100644 --- a/package.json +++ b/package.json @@ -86,5 +86,9 @@ "registry": "https://registry.npmjs.org" }, "author": "fanruan", - "license": "MIT" -} \ No newline at end of file + "license": "MIT", + "dependencies": { + "@types/yargs": "17.0.13", + "yargs": "17.6.2" + } +} From 2f9c3337fc4bbb099c6e44dc556c8d1c46443cb8 Mon Sep 17 00:00:00 2001 From: guy Date: Tue, 15 Nov 2022 17:54:05 +0800 Subject: [PATCH 53/68] =?UTF-8?q?KERNEL-13158:=20zhenfei=E6=BC=8F=E6=94=B9?= =?UTF-8?q?=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/case/linearsegment/linear.segment.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/case/linearsegment/linear.segment.js b/src/case/linearsegment/linear.segment.js index 3c1b677c3..b0b00f95b 100644 --- a/src/case/linearsegment/linear.segment.js +++ b/src/case/linearsegment/linear.segment.js @@ -3,9 +3,6 @@ BI.LinearSegment = BI.inherit(BI.Widget, { props: { baseCls: "bi-linear-segment", items: [], - layouts: [{ - type: "bi.center" - }], height: 30 }, @@ -13,11 +10,14 @@ BI.LinearSegment = BI.inherit(BI.Widget, { var self = this, o = this.options; return { type: "bi.button_group", - items: BI.createItems(o.items, { + items: [BI.createItems(o.items, { type: "bi.linear_segment_button", height: o.height - }), - layouts: o.layouts, + })], + layouts: [{ + type: "bi.table", + columnSize: BI.makeArrayByArray(o.items, "fill"), + }], value: o.value, listeners: [{ eventName: "__EVENT_CHANGE__", From 616f473ea979f9a4083c085061a351e4c01eda89 Mon Sep 17 00:00:00 2001 From: data Date: Tue, 15 Nov 2022 17:56:33 +0800 Subject: [PATCH 54/68] auto upgrade version to 2.0.20221115175620 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index ebc245f87..0f26417fe 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221114221310", + "version": "2.0.20221115175620", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", @@ -91,4 +91,4 @@ "@types/yargs": "17.0.13", "yargs": "17.6.2" } -} +} \ No newline at end of file From d205e542834eee9f8f8a58f92b84c9fd0bcd08ea Mon Sep 17 00:00:00 2001 From: zsmj Date: Wed, 16 Nov 2022 14:01:10 +0800 Subject: [PATCH 55/68] =?UTF-8?q?=E6=97=A0JIRA=20configRender.call(this?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/4.widget.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/4.widget.js b/src/core/4.widget.js index 3adf1f5f4..e541191df 100644 --- a/src/core/4.widget.js +++ b/src/core/4.widget.js @@ -364,7 +364,7 @@ var workerMode = BI.Providers.getProvider("bi.provider.system").getWorkerMode(); var render = BI.isFunction(this.options.render) ? this.options.render : (workerMode ? (this.$render || this.render) : this.render); var els = render && render.call(this); - els = this.options.configRender ? this.options.configRender(els) : els; + els = this.options.configRender ? this.options.configRender.call(this, els) : els; els = BI.Plugin.getRender(this.options.type, els); if (BI.isPlainObject(els)) { els = [els]; From e27686460c6817e82da5c046e36a7681b874ede4 Mon Sep 17 00:00:00 2001 From: data Date: Wed, 16 Nov 2022 14:34:11 +0800 Subject: [PATCH 56/68] auto upgrade version to 2.0.20221116143350 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0f26417fe..3c9656bb8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221115175620", + "version": "2.0.20221116143350", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From 346b126b617dc3fcfa57c6a75be0f0ea735a2ae3 Mon Sep 17 00:00:00 2001 From: data Date: Wed, 16 Nov 2022 15:15:21 +0800 Subject: [PATCH 57/68] auto upgrade version to 2.0.20221116151511 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3c9656bb8..37c1ef1db 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221116143350", + "version": "2.0.20221116151511", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From d90c2469cc7113c06d56107d1d2ba91c868ce3ef Mon Sep 17 00:00:00 2001 From: windy Date: Wed, 16 Nov 2022 17:20:41 +0800 Subject: [PATCH 58/68] =?UTF-8?q?BI-117406=20fix:=20=E5=8A=A8=E6=80=81?= =?UTF-8?q?=E5=9B=BE=E6=A0=87=E6=97=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/widget/year/combo.year.js | 2 +- src/widget/yearmonth/combo.yearmonth.js | 2 +- src/widget/yearquarter/combo.yearquarter.js | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/widget/year/combo.year.js b/src/widget/year/combo.year.js index 558a6c62a..d2d68d19b 100644 --- a/src/widget/year/combo.year.js +++ b/src/widget/year/combo.year.js @@ -141,7 +141,7 @@ BI.DynamicYearCombo = BI.inherit(BI.Widget, { items: [{ el: { type: "bi.icon_button", - cls: "bi-trigger-icon-button", + cls: "bi-trigger-icon-button date-change-h-font", width: this._const.iconWidth, height: BI.toPix(o.height, border), ref: function () { diff --git a/src/widget/yearmonth/combo.yearmonth.js b/src/widget/yearmonth/combo.yearmonth.js index 4a85db0f2..82d6e3ca8 100644 --- a/src/widget/yearmonth/combo.yearmonth.js +++ b/src/widget/yearmonth/combo.yearmonth.js @@ -141,7 +141,7 @@ BI.DynamicYearMonthCombo = BI.inherit(BI.Single, { items: [{ el: { type: "bi.icon_button", - cls: "bi-trigger-icon-button", + cls: "bi-trigger-icon-button date-change-h-font", width: BI.toPix(o.height, border), height: BI.toPix(o.height, border), ref: function () { diff --git a/src/widget/yearquarter/combo.yearquarter.js b/src/widget/yearquarter/combo.yearquarter.js index 455fd9901..1403d254f 100644 --- a/src/widget/yearquarter/combo.yearquarter.js +++ b/src/widget/yearquarter/combo.yearquarter.js @@ -144,7 +144,7 @@ BI.DynamicYearQuarterCombo = BI.inherit(BI.Widget, { items: [{ el: { type: "bi.icon_button", - cls: "bi-trigger-icon-button", + cls: "bi-trigger-icon-button date-change-h-font", width: this._consts.iconWidth, height: BI.toPix(o.height, border), ref: function () { @@ -169,7 +169,7 @@ BI.DynamicYearQuarterCombo = BI.inherit(BI.Widget, { } switch (type) { case BI.DynamicYearQuarterCombo.Dynamic: - this.comboWrapper.resize(); + this.changeIcon.setVisible(true); break; default: this.changeIcon.setVisible(false); From 851ca0f4615a2718f7fa8679944f73ea1ebe2fea Mon Sep 17 00:00:00 2001 From: data Date: Wed, 16 Nov 2022 17:54:48 +0800 Subject: [PATCH 59/68] auto upgrade version to 2.0.20221116175433 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 37c1ef1db..02af54253 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221116151511", + "version": "2.0.20221116175433", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From 686ad06db08bf632615d32253aee29593ed07581 Mon Sep 17 00:00:00 2001 From: "Xavier.Meng" Date: Wed, 16 Nov 2022 18:28:48 +0800 Subject: [PATCH 60/68] =?UTF-8?q?=E6=97=A0JIRA=20refactor(base):=20?= =?UTF-8?q?=E7=BB=99findIndex=E5=8A=A0=E6=B3=9B=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- typescript/core/base.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/typescript/core/base.ts b/typescript/core/base.ts index b5a3ce55c..6182a0833 100644 --- a/typescript/core/base.ts +++ b/typescript/core/base.ts @@ -148,9 +148,9 @@ export interface _base { takeRight: (array: T[], n: number) => T[]; - findIndex: (array: any[], value: any, callback?: Function | object | string, thisArg?: any) => number; + findIndex: (array: T[], predicate?: ((index: number, item: T, array: T[]) => any) | object | string, thisArg?: any) => number; - findLastIndex: (array: any[], value: any, callback?: Function | object | string, thisArg?: any) => number; + findLastIndex: (array: T[], predicate?: ((index: number, item: T, array: T[]) => any) | object | string, thisArg?: any) => number; makeArray: (length: number, value?: T) => number[] | T[]; From 42dd1d2f7f80b5ec3490a336c778109bec6e1e5d Mon Sep 17 00:00:00 2001 From: data Date: Wed, 16 Nov 2022 20:15:11 +0800 Subject: [PATCH 61/68] auto upgrade version to 2.0.20221116201501 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 02af54253..5729038dd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221116175433", + "version": "2.0.20221116201501", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From 5a30dce710034e67b04a7686f795feb8eac3a8c4 Mon Sep 17 00:00:00 2001 From: data Date: Thu, 17 Nov 2022 12:54:21 +0800 Subject: [PATCH 62/68] auto upgrade version to 2.0.20221117125408 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5729038dd..1866c70bd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221116201501", + "version": "2.0.20221117125408", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From 67cd40af6df45ea34a55b0ee907df807413b82b1 Mon Sep 17 00:00:00 2001 From: data Date: Thu, 17 Nov 2022 17:24:05 +0800 Subject: [PATCH 63/68] auto upgrade version to 2.0.20221117172352 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1866c70bd..841972678 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221117125408", + "version": "2.0.20221117172352", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From 10846491f043bae8ae9c00c1ad33604528e2a237 Mon Sep 17 00:00:00 2001 From: Sylar Date: Mon, 21 Nov 2022 18:48:45 +0800 Subject: [PATCH 64/68] =?UTF-8?q?REPORT-83708=20fix:=20worker=E5=AF=B9safa?= =?UTF-8?q?ri=E6=B5=8F=E8=A7=88=E5=99=A812=E4=BB=A5=E4=B8=8B=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E5=81=9A=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/platform/web/function.js | 12 ++++++++++++ typescript/core/platform/web/function.ts | 1 + .../controller/worker.main_thread.controller.ts | 3 ++- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/core/platform/web/function.js b/src/core/platform/web/function.js index 230fc6ad5..1c74836e2 100644 --- a/src/core/platform/web/function.js +++ b/src/core/platform/web/function.js @@ -125,5 +125,17 @@ BI._.extend(BI, { } } return false; + }, + + getSafariVersion: function () { + if (!_global.navigator) { + return 0; + } + var agent = navigator.userAgent.toLowerCase(); + var version = agent.match(/version\/([\d.]+)/); + if (version && version[1]) { + return version[1] * 1; + } + return 0; } }); diff --git a/typescript/core/platform/web/function.ts b/typescript/core/platform/web/function.ts index 95b2d29ef..406eb95ee 100644 --- a/typescript/core/platform/web/function.ts +++ b/typescript/core/platform/web/function.ts @@ -9,4 +9,5 @@ export type _function = { isMac: () => boolean; isWindows: () => boolean; isSupportCss3: (style: any) => boolean; + getSafariVersion: () => number; } \ No newline at end of file diff --git a/typescript/core/worker/controller/worker.main_thread.controller.ts b/typescript/core/worker/controller/worker.main_thread.controller.ts index bd7dcfc96..b9ddb4fb6 100644 --- a/typescript/core/worker/controller/worker.main_thread.controller.ts +++ b/typescript/core/worker/controller/worker.main_thread.controller.ts @@ -10,9 +10,10 @@ export class WorkerMainThreadController extends WorkerBaseController { /** * 是否支持 new Worker, 默认为 Wroker Class 是否实现 + * 由于Blob url支持度问题 规避Safari 12以下版本 */ - public canNewWorker: boolean = WorkerMainThreadController.hasWorkerClass; + public canNewWorker: boolean = WorkerMainThreadController.hasWorkerClass && !(BI.isSafari() && BI.getSafariVersion() < 12); /** * 主线程 new Worker 起始时刻 From 732054bfd699817c954c7c9190a817b340c6e54d Mon Sep 17 00:00:00 2001 From: windy Date: Tue, 22 Nov 2022 15:54:24 +0800 Subject: [PATCH 65/68] =?UTF-8?q?BI-117684=20=E8=A7=86=E8=A7=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/less/base/single/button/button.less | 1 + src/less/lib/theme.less | 1 + 2 files changed, 2 insertions(+) diff --git a/src/less/base/single/button/button.less b/src/less/base/single/button/button.less index b9aad6d1a..d404edd24 100644 --- a/src/less/base/single/button/button.less +++ b/src/less/base/single/button/button.less @@ -502,6 +502,7 @@ body .bi-button, #body .bi-button { &.button-error.disabled, &.button-warning.disabled { &, &.base-disabled { + color: @color-bi-text-disabled-button-theme-dark !important; border-color: @color-bi-border-dark-gray-line-theme-dark !important; background-color: fade(@color-bi-background-disabled-button-theme-dark, 20%) !important; @ieColor: argb(fade(@color-bi-background-disabled-button-theme-dark, 20%)); diff --git a/src/less/lib/theme.less b/src/less/lib/theme.less index 1092dd18a..50339345c 100644 --- a/src/less/lib/theme.less +++ b/src/less/lib/theme.less @@ -125,6 +125,7 @@ @color-bi-text-error-clear-button: @color-bi-text-failure; @color-bi-text-error-ghost-button: @color-bi-text-failure; @color-bi-text-disabled-button: @color-bi-text-disabled; +@color-bi-text-disabled-button-theme-dark: @color-bi-text-disabled-theme-dark; @color-bi-background-disabled-button: @color-bi-background-light-disabled; @color-bi-border-disabled-button: @color-bi-border-disabled; @color-bi-text-disabled-ignore-button: @color-bi-text-disabled; From c880da684f2f1ea195d3f18384ffc130bf71b54d Mon Sep 17 00:00:00 2001 From: data Date: Mon, 21 Nov 2022 19:06:10 +0800 Subject: [PATCH 66/68] auto upgrade version to 2.0.20221121190600 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 841972678..b54ae8401 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221117172352", + "version": "2.0.20221121190600", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From 7434617a2e8458c0ebfb5622274071d78344dab3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?treecat-=E7=BD=97=E7=BE=A4?= Date: Tue, 22 Nov 2022 10:15:56 +0800 Subject: [PATCH 67/68] =?UTF-8?q?Pull=20request=20#3222:=20REPORT-85040=20?= =?UTF-8?q?fix:=20=E6=97=A5=E6=9C=9F=E6=8E=A7=E4=BB=B6=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E4=BC=9A=E8=B6=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Merge in VISUAL/fineui from ~TREECAT/fineui:master to master * commit '016c8de5dc9be8054329411ee2b35a4b2d39aa12': REPORT-85040 fix: 日期控件时间会超 --- src/case/calendar/calendar.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/case/calendar/calendar.js b/src/case/calendar/calendar.js index 88ccf198a..0a9d40e05 100644 --- a/src/case/calendar/calendar.js +++ b/src/case/calendar/calendar.js @@ -156,13 +156,21 @@ BI.Calendar = BI.inherit(BI.Widget, { return BI.map(items, function (i, item) { return BI.map(item, function (j, td) { var month = td.lastMonth ? o.month - 1 : (td.nextMonth ? o.month + 1 : o.month); + var year = o.year; + if (month > 12) { + month = 1; + year++; + } else if (month < 1) { + month = 12; + year--; + } return BI.extend(td, { type: "bi.calendar_date_item", once: false, forceSelected: true, - value: o.year + "-" + month + "-" + td.text, + value: year + "-" + month + "-" + td.text, disabled: td.disabled, - cls: td.lastMonth || td.nextMonth ? "not-current-month-day": "", + cls: td.lastMonth || td.nextMonth ? "not-current-month-day" : "", lgap: 2, rgap: 2, tgap: 4, From 12e3009c08a3b08336f03aa87f169d7ddee413d9 Mon Sep 17 00:00:00 2001 From: Sylar Date: Tue, 29 Nov 2022 10:14:43 +0800 Subject: [PATCH 68/68] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1=20MultiLa?= =?UTF-8?q?yerSelectTreeCombo=E9=83=A8=E5=88=86=E6=96=B9=E6=B3=95=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../multilayerselecttree/multilayerselecttree.combo.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/widget/multilayerselecttree/multilayerselecttree.combo.js b/src/widget/multilayerselecttree/multilayerselecttree.combo.js index 9d334bffd..ec2a9a393 100644 --- a/src/widget/multilayerselecttree/multilayerselecttree.combo.js +++ b/src/widget/multilayerselecttree/multilayerselecttree.combo.js @@ -260,11 +260,11 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, { }, focus: function () { - this.trigger.focus(); + this.trigger ? this.trigger.focus() : this.textTrigger.focus(); }, blur: function () { - this.trigger.blur(); + this.trigger ? this.trigger.blur() : this.textTrigger.blur(); }, showView: function () { @@ -272,7 +272,7 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, { }, setWaterMark: function (v) { - this.trigger.setWaterMark(v); + this.trigger ? this.trigger.setWaterMark(v) : this.textTrigger.setWaterMark(v); } });