From 9dd61713d751dd94e1eeca6247b43ea121072349 Mon Sep 17 00:00:00 2001 From: Claire <1119518763@qq.com> Date: Thu, 15 Sep 2022 15:49:16 +0800 Subject: [PATCH 1/8] =?UTF-8?q?BI-113239=20fix:bilessconfig=E5=90=8C?= =?UTF-8?q?=E6=AD=A5final11.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bi.lessconfig.json | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/bi.lessconfig.json b/bi.lessconfig.json index 7de7350ae..cbb1aabcf 100644 --- a/bi.lessconfig.json +++ b/bi.lessconfig.json @@ -22,6 +22,9 @@ "@color-bi-border-radio": "rgba(9, 30, 64, 0.37)", "@color-bi-border-disabled-radio": "rgba(9, 30, 64, 0.19)", "@color-bi-background-active-radio-content": "#2C60DB", + "@color-bi-border-checkbox-theme-dark": "rgba(255, 255, 255, 0.37)", + "@color-bi-border-hover-active-radio-theme-dark": "#3869DC", + "@color-bi-background-active-radio-content-theme-dark": "#3869DC", "@color-bi-background-disabled-active-radio-content": "#FFFFFF", "@color-bi-background-disabled-active-radio-content-theme-dark": "#606479", "@color-bi-background-disabled-active-checkbox-content": "#FFFFFF", @@ -39,6 +42,9 @@ "@color-bi-color-toast-text": "#000A19", "@color-bi-text-header-background": "rgba(9, 30, 64, 0.9)", "@color-bi-text-header-background-theme-dark": "rgba(255, 255, 255, 0.9)", - "@font-down-triangle": "e70b", - "@font-date": "e733" -} \ No newline at end of file + "@font-date": "e733", + "@font-trigger-triangle": "e924", + "@font-solid-bottom": "e905", + "@font-solid-right": "e906", + "@font-dot": "e762" +} From 0272363a6fea4c118c85151ec00113f743e88c76 Mon Sep 17 00:00:00 2001 From: Lee94 Date: Fri, 23 Sep 2022 14:19:23 +0800 Subject: [PATCH 2/8] =?UTF-8?q?JSY-22136=20=E5=86=85=E5=AD=98=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/grid/grid.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/base/grid/grid.js b/src/base/grid/grid.js index e88169a3d..edeb8a8f3 100644 --- a/src/base/grid/grid.js +++ b/src/base/grid/grid.js @@ -96,6 +96,12 @@ BI.GridView = BI.inherit(BI.Widget, { this.element.scrollLeft(o.scrollLeft); } }, + + destroyed: function () { + BI.each(this.renderedCells, function(i, cell) { + cell.el._destroy(); + }) + }, _calculateSizeAndPositionData: function () { var o = this.options; From a8f2d6296c50f2db4d4216ec5336fd45584e2978 Mon Sep 17 00:00:00 2001 From: data Date: Fri, 23 Sep 2022 17:45:22 +0800 Subject: [PATCH 3/8] auto upgrade version to 2.0.20220923174504 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7ce1566b8..154f8f88a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20220921232331", + "version": "2.0.20220923174504", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From e9060590c932fe94bc7147cd4fb9eeee69754ec8 Mon Sep 17 00:00:00 2001 From: guy Date: Sun, 25 Sep 2022 18:41:25 +0800 Subject: [PATCH 4/8] update --- src/core/4.widget.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/4.widget.js b/src/core/4.widget.js index 957ae836f..3c28a3976 100644 --- a/src/core/4.widget.js +++ b/src/core/4.widget.js @@ -360,6 +360,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 = BI.Plugin.getRender(this.options.type, els); if (BI.isPlainObject(els)) { els = [els]; From 2384746e190e81e59f8cb0d350a747111ff3cc3e Mon Sep 17 00:00:00 2001 From: data Date: Sun, 25 Sep 2022 19:03:40 +0800 Subject: [PATCH 5/8] auto upgrade version to 2.0.20220925190333 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 154f8f88a..da221b248 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20220923174504", + "version": "2.0.20220925190333", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From 49200d7d082d9a767791fac97016449ba281f8a3 Mon Sep 17 00:00:00 2001 From: data Date: Mon, 26 Sep 2022 10:15:35 +0800 Subject: [PATCH 6/8] auto upgrade version to 2.0.20220926101524 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index da221b248..be3165cb0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20220925190333", + "version": "2.0.20220926101524", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", From ecbfd56508215e1ec0eac82c979fd33eb263cd8f Mon Sep 17 00:00:00 2001 From: Treecat Date: Mon, 26 Sep 2022 15:24:51 +0800 Subject: [PATCH 7/8] =?UTF-8?q?KERNEL-12250=20feat:=E7=AE=80=E5=8C=96?= =?UTF-8?q?=E4=B8=80=E4=B8=8Bcombolist=E7=9A=84api?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- demo/js/widget/downlist/demo.downlist.js | 18 +- src/widget/downlist/combo.downlist.js | 243 +++++++++++++---------- 2 files changed, 143 insertions(+), 118 deletions(-) diff --git a/demo/js/widget/downlist/demo.downlist.js b/demo/js/widget/downlist/demo.downlist.js index 6b72ff61f..df01a9a28 100644 --- a/demo/js/widget/downlist/demo.downlist.js +++ b/demo/js/widget/downlist/demo.downlist.js @@ -47,11 +47,9 @@ Demo.Downlist = BI.inherit(BI.Widget, { width: 100, items: [ [{ - el: { - text: "column 1111", - iconCls1: "dot-e-font", - value: 12 - }, + text: "column 1111", + iconCls1: "dot-e-font", + value: 12, children: [{ text: "column 1.1", value: 21, @@ -166,12 +164,10 @@ Demo.Downlist = BI.inherit(BI.Widget, { }], items: [ [{ - el: { - text: "选项一", - value: 1, - icon: { - type: "demo.downlist.icon", - }, + text: "选项一", + value: 1, + icon: { + type: "demo.downlist.icon", }, children: [{ text: "选项一", diff --git a/src/widget/downlist/combo.downlist.js b/src/widget/downlist/combo.downlist.js index be615e6ea..cf983dfc4 100644 --- a/src/widget/downlist/combo.downlist.js +++ b/src/widget/downlist/combo.downlist.js @@ -1,110 +1,139 @@ -/** - * Created by roy on 15/8/14. - */ -BI.DownListCombo = BI.inherit(BI.Widget, { - _defaultConfig: function () { - return BI.extend(BI.DownListCombo.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-down-list-combo", - height: 24, - items: [], - adjustLength: 0, - direction: "bottom", - trigger: "click", - container: null, - stopPropagation: false, - el: {}, - minWidth: 140, - maxHeight: 1000, - destroyWhenHide: false +(function() { + function transformItems(items) { + if (!items) return items; + var result = BI.cloneDeep(items); + var isComplexItmes = BI.some(items, function (_, item) { + return BI.isArray(item); }); - }, - - _init: function () { - BI.DownListCombo.superclass._init.apply(this, arguments); - var self = this, o = this.options; - - this.downlistcombo = BI.createWidget({ - element: this, - type: "bi.combo", - trigger: o.trigger, - isNeedAdjustWidth: false, - isDefaultInit: true, - container: o.container, - adjustLength: o.adjustLength, - direction: o.direction, - belowMouse: o.belowMouse, - stopPropagation: o.stopPropagation, - destroyWhenHide: o.destroyWhenHide, - el: BI.createWidget(o.el, { - type: "bi.icon_trigger", - extraCls: o.iconCls, - width: o.width, - height: o.height - }), - popup: { - el: { - type: "bi.down_list_popup", - ref: function (ref) { - self.popupView = ref; - }, - items: o.items, - chooseType: o.chooseType, - value: o.value, - listeners: [{ - eventName: BI.DownListPopup.EVENT_CHANGE, - action: function (value) { - self.fireEvent(BI.DownListCombo.EVENT_CHANGE, value); - self.downlistcombo.hideView(); - } - }, { - eventName: BI.DownListPopup.EVENT_SON_VALUE_CHANGE, - action: function (value, fatherValue) { - self.fireEvent(BI.DownListCombo.EVENT_SON_VALUE_CHANGE, value, fatherValue); - self.downlistcombo.hideView(); - } - }] - }, - stopPropagation: o.stopPropagation, - maxHeight: o.maxHeight, - minWidth: o.minWidth - } - }); - - this.downlistcombo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () { - self.fireEvent(BI.DownListCombo.EVENT_BEFORE_POPUPVIEW); + // 传一维数组,帮转二维 + if (!isComplexItmes) { + result = [result]; + } + // 帮转 el + BI.each(result, function (_, arr) { + BI.each(arr, function (_, item) { + if (item.children && !item.el) { + item.el = { + text: item.text, + icon: item.icon, + cls: item.cls, + iconCls1: item.iconCls1, + value: item.value + }; + } + }); }); - }, - - 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(); + return result; } -}); -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); + + /** + * Created by roy on 15/8/14. + */ + BI.DownListCombo = BI.inherit(BI.Widget, { + _defaultConfig: function () { + return BI.extend(BI.DownListCombo.superclass._defaultConfig.apply(this, arguments), { + baseCls: "bi-down-list-combo", + height: 24, + items: [], + adjustLength: 0, + direction: "bottom", + trigger: "click", + container: null, + stopPropagation: false, + el: {}, + 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", + trigger: o.trigger, + isNeedAdjustWidth: false, + isDefaultInit: true, + container: o.container, + adjustLength: o.adjustLength, + direction: o.direction, + belowMouse: o.belowMouse, + stopPropagation: o.stopPropagation, + destroyWhenHide: o.destroyWhenHide, + el: BI.createWidget(o.el, { + type: "bi.icon_trigger", + extraCls: o.iconCls, + width: o.width, + height: o.height + }), + popup: { + el: { + type: "bi.down_list_popup", + ref: function (ref) { + self.popupView = ref; + }, + items: transformItems(o.items), + chooseType: o.chooseType, + value: o.value, + listeners: [{ + eventName: BI.DownListPopup.EVENT_CHANGE, + action: function (value) { + self.fireEvent(BI.DownListCombo.EVENT_CHANGE, value); + self.downlistcombo.hideView(); + } + }, { + eventName: BI.DownListPopup.EVENT_SON_VALUE_CHANGE, + action: function (value, fatherValue) { + self.fireEvent(BI.DownListCombo.EVENT_SON_VALUE_CHANGE, value, fatherValue); + self.downlistcombo.hideView(); + } + }] + }, + stopPropagation: o.stopPropagation, + maxHeight: o.maxHeight, + minWidth: o.minWidth + } + }); + + 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(); + } + }); + 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 c263d2194db4ba3416dd5485db08a7c8b58a1624 Mon Sep 17 00:00:00 2001 From: data Date: Mon, 26 Sep 2022 16:45:59 +0800 Subject: [PATCH 8/8] auto upgrade version to 2.0.20220926164538 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index be3165cb0..d63505080 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20220926101524", + "version": "2.0.20220926164538", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts",