From 45b13253b03eee7d4b71c37eacc9cf4bb4261991 Mon Sep 17 00:00:00 2001 From: Kitetop Date: Tue, 2 Aug 2022 15:11:05 +0800 Subject: [PATCH 1/4] =?UTF-8?q?REPORT-77246=20fix:=20=E4=BF=AE=E5=A4=8Dbi.?= =?UTF-8?q?time=5Fcombo=E7=BB=84=E4=BB=B6=E5=86=85=E5=AE=B9=E5=92=8C?= =?UTF-8?q?=E5=9B=BE=E6=A0=87=E9=87=8D=E5=8F=A0=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/widget/time/time.combo.js | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/widget/time/time.combo.js b/src/widget/time/time.combo.js index 30c40e0ab..a215cf0f2 100644 --- a/src/widget/time/time.combo.js +++ b/src/widget/time/time.combo.js @@ -62,11 +62,12 @@ return { type: "bi.htape", items: [{ - type: "bi.absolute", + type: "bi.horizontal_fill", + cls: "bi-border bi-border-radius", + columnSize: ["fill", this.constants.iconWidth], items: [{ el: { type: "bi.combo", - cls: "bi-border bi-border-radius", container: opts.container, toggle: false, isNeedAdjustHeight: opts.isNeedAdjustHeight, @@ -170,16 +171,12 @@ self.combo = _ref; } }, - top: 0, - left: 0, - right: 0, - bottom: 0 }, { el: { type: "bi.icon_button", - cls: "bi-trigger-icon-button time-font icon-size-16", + cls: "bi-trigger-icon-button time-font", width: this.constants.iconWidth, - height: opts.height, + height: opts.height - 2, listeners: [{ eventName: BI.IconButton.EVENT_CHANGE, action: function () { @@ -194,8 +191,6 @@ self.triggerBtn = _ref; } }, - top: 0, - right: 0 }] }] }; From f02eedd0b9abb9e2b846eb8fe63b7121a090a221 Mon Sep 17 00:00:00 2001 From: Kitetop Date: Tue, 2 Aug 2022 16:38:15 +0800 Subject: [PATCH 2/4] =?UTF-8?q?REPORT-77246=20fix:=20=E6=A0=B9=E6=8D=AErev?= =?UTF-8?q?iew=E5=BB=BA=E8=AE=AE=E4=BF=AE=E6=94=B9=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/widget/time/time.combo.js | 240 +++++++++++++++++----------------- 1 file changed, 119 insertions(+), 121 deletions(-) diff --git a/src/widget/time/time.combo.js b/src/widget/time/time.combo.js index a215cf0f2..e3aa83713 100644 --- a/src/widget/time/time.combo.js +++ b/src/widget/time/time.combo.js @@ -60,138 +60,136 @@ } }; return { - type: "bi.htape", + type: "bi.horizontal_fill", + cls: "bi-border bi-border-radius", + columnSize: ["fill", this.constants.iconWidth], + height: opts.height - 2, + width: opts.width - 2, items: [{ - type: "bi.horizontal_fill", - cls: "bi-border bi-border-radius", - columnSize: ["fill", this.constants.iconWidth], - items: [{ + el: { + type: "bi.combo", + container: opts.container, + toggle: false, + isNeedAdjustHeight: opts.isNeedAdjustHeight, + isNeedAdjustWidth: opts.isNeedAdjustWidth, el: { - type: "bi.combo", - container: opts.container, - toggle: false, - isNeedAdjustHeight: opts.isNeedAdjustHeight, - isNeedAdjustWidth: opts.isNeedAdjustWidth, - el: { - type: "bi.time_trigger", - height: opts.height - 2, - allowEdit: opts.allowEdit, - watermark: opts.watermark, - format: opts.format, - value: opts.value, - ref: function (_ref) { - self.trigger = _ref; - }, - listeners: [{ - eventName: "EVENT_KEY_DOWN", - action: function () { - if (self.combo.isViewVisible()) { - self.combo.hideView(); - } - self.fireEvent(BI.TimeCombo.EVENT_KEY_DOWN, arguments); - } - }, { - eventName: "EVENT_STOP", - action: function () { - if (!self.combo.isViewVisible()) { - self.combo.showView(); - } - } - }, { - eventName: "EVENT_FOCUS", - action: function () { - self.storeTriggerValue = self.trigger.getKey(); - if (!self.combo.isViewVisible()) { - self.combo.showView(); - } - self.fireEvent("EVENT_FOCUS"); - } - }, { - eventName: "EVENT_BLUR", - action: function () { - self.fireEvent("EVENT_BLUR"); - } - }, { - eventName: "EVENT_ERROR", - action: function () { - var date = BI.getDate(); - self.storeValue = { - hour: date.getHours(), - minute: date.getMinutes(), - second: date.getSeconds() - }; - self.fireEvent("EVENT_ERROR"); - } - }, { - eventName: "EVENT_VALID", - action: function () { - self.fireEvent("EVENT_VALID"); + type: "bi.time_trigger", + height: opts.height - 2, + allowEdit: opts.allowEdit, + watermark: opts.watermark, + format: opts.format, + value: opts.value, + ref: function (_ref) { + self.trigger = _ref; + }, + listeners: [{ + eventName: "EVENT_KEY_DOWN", + action: function () { + if (self.combo.isViewVisible()) { + self.combo.hideView(); } - }, { - eventName: "EVENT_CHANGE", - action: function () { - self.fireEvent("EVENT_CHANGE"); + self.fireEvent(BI.TimeCombo.EVENT_KEY_DOWN, arguments); + } + }, { + eventName: "EVENT_STOP", + action: function () { + if (!self.combo.isViewVisible()) { + self.combo.showView(); } - }, { - eventName: "EVENT_CONFIRM", - action: function () { - if (self.combo.isViewVisible()) { - return; - } - var dateStore = self.storeTriggerValue; - var dateObj = self.trigger.getKey(); - if (BI.isNotEmptyString(dateObj) && !BI.isEqual(dateObj, dateStore)) { - self.storeValue = self.trigger.getValue(); - self.setValue(self.trigger.getValue()); - } else if (BI.isEmptyString(dateObj)) { - self.storeValue = null; - self.trigger.setValue(); - } - self.fireEvent("EVENT_CONFIRM"); + } + }, { + eventName: "EVENT_FOCUS", + action: function () { + self.storeTriggerValue = self.trigger.getKey(); + if (!self.combo.isViewVisible()) { + self.combo.showView(); } - }] - }, - adjustLength: this.constants.comboAdjustHeight, - popup: { - el: popup, - width: opts.isNeedAdjustWidth ? opts.width : this.constants.popupWidth, - stopPropagation: false - }, - hideChecker: function (e) { - return self.triggerBtn.element.find(e.target).length === 0; - }, - listeners: [{ - eventName: BI.Combo.EVENT_BEFORE_POPUPVIEW, + self.fireEvent("EVENT_FOCUS"); + } + }, { + eventName: "EVENT_BLUR", action: function () { - self.popup.setValue(self.storeValue); - self.fireEvent(BI.TimeCombo.EVENT_BEFORE_POPUPVIEW); + self.fireEvent("EVENT_BLUR"); } - }], - ref: function (_ref) { - self.combo = _ref; - } - }, - }, { - el: { - type: "bi.icon_button", - cls: "bi-trigger-icon-button time-font", - width: this.constants.iconWidth, - height: opts.height - 2, - listeners: [{ - eventName: BI.IconButton.EVENT_CHANGE, + }, { + eventName: "EVENT_ERROR", + action: function () { + var date = BI.getDate(); + self.storeValue = { + hour: date.getHours(), + minute: date.getMinutes(), + second: date.getSeconds() + }; + self.fireEvent("EVENT_ERROR"); + } + }, { + eventName: "EVENT_VALID", + action: function () { + self.fireEvent("EVENT_VALID"); + } + }, { + eventName: "EVENT_CHANGE", + action: function () { + self.fireEvent("EVENT_CHANGE"); + } + }, { + eventName: "EVENT_CONFIRM", action: function () { if (self.combo.isViewVisible()) { - // self.combo.hideView(); - } else { - self.combo.showView(); + return; + } + var dateStore = self.storeTriggerValue; + var dateObj = self.trigger.getKey(); + if (BI.isNotEmptyString(dateObj) && !BI.isEqual(dateObj, dateStore)) { + self.storeValue = self.trigger.getValue(); + self.setValue(self.trigger.getValue()); + } else if (BI.isEmptyString(dateObj)) { + self.storeValue = null; + self.trigger.setValue(); } + self.fireEvent("EVENT_CONFIRM"); } - }], - ref: function (_ref) { - self.triggerBtn = _ref; - } + }] + }, + adjustLength: this.constants.comboAdjustHeight, + popup: { + el: popup, + width: opts.isNeedAdjustWidth ? opts.width : this.constants.popupWidth, + stopPropagation: false + }, + hideChecker: function (e) { + return self.triggerBtn.element.find(e.target).length === 0; }, - }] + listeners: [{ + eventName: BI.Combo.EVENT_BEFORE_POPUPVIEW, + action: function () { + self.popup.setValue(self.storeValue); + self.fireEvent(BI.TimeCombo.EVENT_BEFORE_POPUPVIEW); + } + }], + ref: function (_ref) { + self.combo = _ref; + } + }, + }, { + el: { + type: "bi.icon_button", + cls: "bi-trigger-icon-button time-font", + width: this.constants.iconWidth, + listeners: [{ + eventName: BI.IconButton.EVENT_CHANGE, + action: function () { + if (self.combo.isViewVisible()) { + // self.combo.hideView(); + } else { + self.combo.showView(); + } + } + }], + ref: function (_ref) { + self.triggerBtn = _ref; + } + }, }] }; }, @@ -223,7 +221,7 @@ focus: function () { this.trigger.focus(); }, - + blur: function () { this.trigger.blur(); }, From 638dcc66ce455192118ae49e12f7ead4c2fcf50b Mon Sep 17 00:00:00 2001 From: iapyang Date: Tue, 9 Aug 2022 14:26:00 +0800 Subject: [PATCH 3/4] =?UTF-8?q?chore:=20=E6=89=93=E5=8C=85=E5=8A=A0?= =?UTF-8?q?=E4=B8=8Ahash?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- webpack/webpack.prod.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/webpack/webpack.prod.js b/webpack/webpack.prod.js index 1af08c2af..89b7f18c8 100644 --- a/webpack/webpack.prod.js +++ b/webpack/webpack.prod.js @@ -12,6 +12,15 @@ const common = require("./webpack.common.js"); const attachments = require("./attachments"); const components = require("./components"); +const childProcess = require('child_process'); + +function git(command) { + return childProcess + .execSync(`git ${command}`) + .toString() + .trim(); +} + module.exports = merge.smart(common, { mode: "production", entry: { @@ -63,7 +72,11 @@ module.exports = merge.smart(common, { } }), new webpack.BannerPlugin({ - banner: `time: ${new Date().toLocaleString()}` + banner: `time: ${new Date().toLocaleString()}; branch: ${git( + 'rev-parse --abbrev-ref HEAD' + )} commit: ${git( + 'rev-parse HEAD' + )}` }) ] }, From 1e0db6efd606375d0b1fcc74d68cb491a7aff334 Mon Sep 17 00:00:00 2001 From: Kitetop Date: Thu, 18 Aug 2022 14:19:01 +0800 Subject: [PATCH 4/4] =?UTF-8?q?REPORT-78514=20revert:=20REPORT-7696?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E6=98=AF=E5=90=A6=E5=BC=82=E6=AD=A5=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E6=95=B0=E6=8D=AE,=E5=92=8C=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E6=98=AF=E5=90=A6=E6=94=AF=E6=8C=81=E6=90=9C=E7=B4=A2=E5=88=86?= =?UTF-8?q?=E7=A6=BB=E5=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../multilayerselecttree.combo.js | 8 +---- .../multilayersingletree.combo.js | 35 ++++++------------- 2 files changed, 11 insertions(+), 32 deletions(-) diff --git a/src/widget/multilayerselecttree/multilayerselecttree.combo.js b/src/widget/multilayerselecttree/multilayerselecttree.combo.js index b46750e7e..48ff0cbe0 100644 --- a/src/widget/multilayerselecttree/multilayerselecttree.combo.js +++ b/src/widget/multilayerselecttree/multilayerselecttree.combo.js @@ -132,11 +132,6 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, { action: function () { self.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_SEARCHING); } - }, { - eventName: BI.MultiLayerSelectTreeTrigger.EVENT_STOP, - action: function () { - self.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_STOP); - } }, { eventName: BI.MultiLayerSelectTreeTrigger.EVENT_ADD_ITEM, action: function () { @@ -248,7 +243,6 @@ BI.MultiLayerSelectTreeCombo.EVENT_SEARCHING = "EVENT_SEARCHING"; BI.MultiLayerSelectTreeCombo.EVENT_BLUR = "EVENT_BLUR"; BI.MultiLayerSelectTreeCombo.EVENT_FOCUS = "EVENT_FOCUS"; BI.MultiLayerSelectTreeCombo.EVENT_CHANGE = "EVENT_CHANGE"; -BI.MultiLayerSelectTreeCombo.EVENT_STOP = "EVENT_STOP"; BI.MultiLayerSelectTreeCombo.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW"; BI.MultiLayerSelectTreeCombo.EVENT_CLICK_ITEM = "EVENT_CLICK_ITEM"; -BI.shortcut("bi.multilayer_select_tree_combo", BI.MultiLayerSelectTreeCombo); \ No newline at end of file +BI.shortcut("bi.multilayer_select_tree_combo", BI.MultiLayerSelectTreeCombo); diff --git a/src/widget/multilayersingletree/multilayersingletree.combo.js b/src/widget/multilayersingletree/multilayersingletree.combo.js index fd606ccf7..63f43b4f9 100644 --- a/src/widget/multilayersingletree/multilayersingletree.combo.js +++ b/src/widget/multilayersingletree/multilayersingletree.combo.js @@ -36,6 +36,11 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, { return (o.itemsCreator === BI.emptyFn) ? this._getSyncConfig() : this._getAsyncConfig(); }, + _shouldWrapper: function () { + var o = this.options; + return !o.allowEdit && o.itemsCreator === BI.emptyFn; + }, + _getBaseConfig: function () { var self = this, o = this.options; return { @@ -94,6 +99,7 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, { container: o.container, allowInsertValue: o.allowInsertValue, allowSearchValue: o.allowSearchValue, + allowEdit: o.allowEdit, cls: "multilayer-single-tree-trigger", ref: function (_ref) { self.trigger = _ref; @@ -130,11 +136,6 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, { action: function () { self.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_SEARCHING); } - }, { - eventName: BI.MultiLayerSingleTreeTrigger.EVENT_STOP, - action: function () { - self.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_STOP); - } }, { eventName: BI.MultiLayerSingleTreeTrigger.EVENT_ADD_ITEM, action: function () { @@ -183,28 +184,13 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, { tipType: o.tipType, warningTitle: o.warningTitle, valueFormatter: o.valueFormatter, - }, + } }); }, _getAsyncConfig: function () { - var o = this.options, self = this; - var baseConfig = this._getBaseConfig(); - return BI.extend(baseConfig, o.allowEdit ? this._getSearchConfig() : { - el: { - type: "bi.single_tree_trigger", - ref: function (_ref) { - self.textTrigger = _ref; - }, - text: o.text, - height: o.height, - items: o.items, - value: o.value, - tipType: o.tipType, - warningTitle: o.warningTitle, - valueFormatter: o.valueFormatter, - }, - }); + var config = this._getBaseConfig(); + return BI.extend(config, this._getSearchConfig()); }, getSearcher: function () { @@ -257,6 +243,5 @@ BI.MultiLayerSingleTreeCombo.EVENT_SEARCHING = "EVENT_SEARCHING"; BI.MultiLayerSingleTreeCombo.EVENT_BLUR = "EVENT_BLUR"; BI.MultiLayerSingleTreeCombo.EVENT_FOCUS = "EVENT_FOCUS"; BI.MultiLayerSingleTreeCombo.EVENT_CHANGE = "EVENT_CHANGE"; -BI.MultiLayerSingleTreeCombo.EVENT_STOP = "EVENT_STOP"; BI.MultiLayerSingleTreeCombo.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW"; -BI.shortcut("bi.multilayer_single_tree_combo", BI.MultiLayerSingleTreeCombo); \ No newline at end of file +BI.shortcut("bi.multilayer_single_tree_combo", BI.MultiLayerSingleTreeCombo);