From eadbe4ec2deee6b1f7cb5da2b74bce3ea02a2c3d Mon Sep 17 00:00:00 2001 From: zsmj Date: Wed, 20 Apr 2022 14:32:47 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E6=97=A0JIRA=20=20=E5=8E=BB=E6=8E=89?= =?UTF-8?q?=E6=97=A0=E6=84=8F=E4=B9=89=E7=9A=84scrolly?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/platform/web/config.js | 1 - src/core/wrapper/layout/fill/auto.vtape.js | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/core/platform/web/config.js b/src/core/platform/web/config.js index 3bd279aab..fa310ca1f 100644 --- a/src/core/platform/web/config.js +++ b/src/core/platform/web/config.js @@ -159,7 +159,6 @@ BI.prepares.push(function () { return BI.extend({ horizontalAlign: BI.HorizontalAlign.Stretch, verticalAlign: BI.VerticalAlign.Stretch, - scrolly: false }, ob, {type: "bi.flex_vertical"}); } if (ob.scrollable === true || ob.scrollx === true || ob.scrolly === true) { diff --git a/src/core/wrapper/layout/fill/auto.vtape.js b/src/core/wrapper/layout/fill/auto.vtape.js index 16491ebab..2086258be 100644 --- a/src/core/wrapper/layout/fill/auto.vtape.js +++ b/src/core/wrapper/layout/fill/auto.vtape.js @@ -1,7 +1,7 @@ BI.AutoVerticalTapeLayout = BI.inherit(BI.Layout, { props: function () { return BI.extend(BI.AutoVerticalTapeLayout.superclass.props.apply(this, arguments), { - baseCls: "bi-auto-htape", + baseCls: "bi-auto-vtape", horizontalAlign: BI.HorizontalAlign.Stretch, verticalAlign: BI.VerticalAlign.Stretch, hgap: 0, From a5a237e3c630395fa48ff679ffb966d88a12736c Mon Sep 17 00:00:00 2001 From: zsmj Date: Thu, 21 Apr 2022 11:09:50 +0800 Subject: [PATCH 2/4] =?UTF-8?q?KERNEL-11034=20refactor:=20=E5=8E=BB?= =?UTF-8?q?=E6=8E=89FineUI=E4=B8=ADArray.prototype=E7=9A=84=E6=8B=93?= =?UTF-8?q?=E5=B1=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/controller/controller.broadcast.js | 5 +--- src/widget/multiselect/multiselect.combo.js | 24 ++++++++++++------- .../multiselect/multiselect.combo.nobar.js | 6 ++--- .../multiselect/multiselect.insert.combo.js | 17 ++++++------- .../multiselect.insert.combo.nobar.js | 15 ++++++------ 5 files changed, 36 insertions(+), 31 deletions(-) diff --git a/src/core/controller/controller.broadcast.js b/src/core/controller/controller.broadcast.js index 89b2f0c35..d424d0a68 100644 --- a/src/core/controller/controller.broadcast.js +++ b/src/core/controller/controller.broadcast.js @@ -30,10 +30,7 @@ BI.BroadcastController = BI.inherit(BI.Controller, { remove: function (name, fn) { var self = this; if (fn) { - BI.remove(this._broadcasts[name], function (idx) { - return self._broadcasts[name].indexOf(fn) === idx; - }); - this._broadcasts[name].remove(fn); + BI.remove(this._broadcasts[name], fn); if (this._broadcasts[name].length === 0) { delete this._broadcasts[name]; } diff --git a/src/widget/multiselect/multiselect.combo.js b/src/widget/multiselect/multiselect.combo.js index 09c06b6a3..254aa0340 100644 --- a/src/widget/multiselect/multiselect.combo.js +++ b/src/widget/multiselect/multiselect.combo.js @@ -17,14 +17,15 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, { }, _init: function () { - var self = this; var o = this.options; + var self = this; + var o = this.options; BI.MultiSelectCombo.superclass._init.apply(this, arguments); var assertShowValue = function () { if (BI.isKey(self._startValue)) { if (self.storeValue.type === BI.Selection.All) { BI.remove(self.storeValue.value, self._startValue); self.storeValue.assist = self.storeValue.assist || []; - self.storeValue.assist.pushDistinct(self._startValue); + BI.pushDistinct(self.storeValue.assist, self._startValue); } else { BI.pushDistinct(self.storeValue.value, self._startValue); BI.remove(self.storeValue.assist, self._startValue); @@ -280,7 +281,8 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, { }, _itemsCreator4Trigger: function (op, callback) { - var self = this; var o = this.options; + var self = this; + var o = this.options; o.itemsCreator(op, function (res) { if (op.times === 1 && BI.isNotNull(op.keywords)) { // 预防trigger内部把当前的storeValue改掉 @@ -311,7 +313,8 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, { }, _joinKeywords: function (keywords, callback) { - var self = this; var o = this.options; + var self = this; + var o = this.options; this._assertValue(this.storeValue); this.requesting = true; o.itemsCreator({ @@ -322,7 +325,7 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, { digest(values); }); - function digest (items) { + function digest(items) { var selectedMap = self._makeMap(items); BI.each(keywords, function (i, val) { if (BI.isNotNull(selectedMap[val])) { @@ -334,7 +337,8 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, { }, _joinAll: function (res, callback) { - var self = this; var o = this.options; + var self = this; + var o = this.options; this._assertValue(res); this.requesting = true; if (this.storeValue.type === res.type) { @@ -385,11 +389,12 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, { }, _adjust: function (callback) { - var self = this; var o = this.options; + var self = this; + var o = this.options; adjust(); callback(); - function adjust () { + function adjust() { if (self.wants2Quit === true) { self._dataChange && self.fireEvent(BI.MultiSelectCombo.EVENT_CONFIRM); self.wants2Quit = false; @@ -399,7 +404,8 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, { }, _join: function (res, callback) { - var self = this; var o = this.options; + var self = this; + var o = this.options; this._assertValue(res); this._assertValue(this.storeValue); if (this.storeValue.type === res.type) { diff --git a/src/widget/multiselect/multiselect.combo.nobar.js b/src/widget/multiselect/multiselect.combo.nobar.js index b4fe04154..06138cf4b 100644 --- a/src/widget/multiselect/multiselect.combo.nobar.js +++ b/src/widget/multiselect/multiselect.combo.nobar.js @@ -23,7 +23,7 @@ BI.MultiSelectNoBarCombo = BI.inherit(BI.Single, { if (self.storeValue.type === BI.Selection.All) { BI.remove(self.storeValue.value, self._startValue); self.storeValue.assist = self.storeValue.assist || []; - self.storeValue.assist.pushDistinct(self._startValue); + BI.pushDistinct(self.storeValue.assist, self._startValue); } else { BI.pushDistinct(self.storeValue.value, self._startValue); BI.remove(self.storeValue.assist, self._startValue); @@ -461,11 +461,11 @@ BI.MultiSelectNoBarCombo = BI.inherit(BI.Single, { this.combo.populate.apply(this.combo, arguments); }, - showView:function (){ + showView: function () { this.combo.showView(); }, - hideView:function (){ + hideView: function () { this.combo.hideView(); }, diff --git a/src/widget/multiselect/multiselect.insert.combo.js b/src/widget/multiselect/multiselect.insert.combo.js index 0cedaf020..b5906f856 100644 --- a/src/widget/multiselect/multiselect.insert.combo.js +++ b/src/widget/multiselect/multiselect.insert.combo.js @@ -21,10 +21,10 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, { BI.MultiSelectInsertCombo.superclass._init.apply(this, arguments); var assertShowValue = function () { if (BI.isKey(self._startValue)) { - if(self.storeValue.type === BI.Selection.All) { + if (self.storeValue.type === BI.Selection.All) { BI.remove(self.storeValue.value, self._startValue); self.storeValue.assist = self.storeValue.assist || []; - self.storeValue.assist.pushDistinct(self._startValue); + BI.pushDistinct(self.storeValue.assist, self._startValue); } else { BI.pushDistinct(self.storeValue.value, self._startValue); BI.remove(self.storeValue.assist, self._startValue); @@ -282,7 +282,7 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, { }); }, - _itemsCreator4Trigger: function(op, callback) { + _itemsCreator4Trigger: function (op, callback) { var self = this, o = this.options; o.itemsCreator(op, function (res) { if (op.times === 1 && BI.isNotNull(op.keywords)) { @@ -313,7 +313,7 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, { }); }, - _stopEditing: function() { + _stopEditing: function () { this.trigger.stopEditing(); this.numberCounter.hideView(); }, @@ -340,7 +340,7 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, { digest(); - function digest () { + function digest() { BI.each(keywords, function (i, val) { self.storeValue.type === BI.Selection.Multi ? BI.pushDistinct(self.storeValue.value, val) : BI.remove(self.storeValue.value, val); }); @@ -403,7 +403,8 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, { var self = this, o = this.options; adjust(); callback(); - function adjust () { + + function adjust() { if (self.wants2Quit === true) { self._dataChange && self.fireEvent(BI.MultiSelectInsertCombo.EVENT_CONFIRM); self.wants2Quit = false; @@ -450,11 +451,11 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, { this.combo.populate.apply(this.combo, arguments); }, - showView:function (){ + showView: function () { this.combo.showView(); }, - hideView:function (){ + hideView: function () { this.combo.hideView(); }, diff --git a/src/widget/multiselect/multiselect.insert.combo.nobar.js b/src/widget/multiselect/multiselect.insert.combo.nobar.js index 39099bbde..de4f9eb35 100644 --- a/src/widget/multiselect/multiselect.insert.combo.nobar.js +++ b/src/widget/multiselect/multiselect.insert.combo.nobar.js @@ -23,7 +23,7 @@ BI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, { if (self.storeValue.type === BI.Selection.All) { BI.remove(self.storeValue.value, self._startValue); self.storeValue.assist = self.storeValue.assist || []; - self.storeValue.assist.pushDistinct(self._startValue); + BI.pushDistinct(self.storeValue.assist, self._startValue); } else { BI.pushDistinct(self.storeValue.value, self._startValue); BI.remove(self.storeValue.assist, self._startValue); @@ -279,7 +279,7 @@ BI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, { }); }, - _itemsCreator4Trigger: function(op, callback) { + _itemsCreator4Trigger: function (op, callback) { var self = this, o = this.options; o.itemsCreator(op, function (res) { if (op.times === 1 && BI.isNotNull(op.keywords)) { @@ -310,7 +310,7 @@ BI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, { }); }, - _stopEditing: function() { + _stopEditing: function () { this.trigger.stopEditing(); this.numberCounter.hideView(); }, @@ -337,7 +337,7 @@ BI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, { digest(); - function digest () { + function digest() { BI.each(keywords, function (i, val) { self.storeValue.type === BI.Selection.Multi ? BI.pushDistinct(self.storeValue.value, val) : BI.remove(self.storeValue.value, val); }); @@ -400,7 +400,8 @@ BI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, { var self = this, o = this.options; adjust(); callback(); - function adjust () { + + function adjust() { if (self.wants2Quit === true) { self._dataChange && self.fireEvent(BI.MultiSelectInsertNoBarCombo.EVENT_CONFIRM); self.wants2Quit = false; @@ -446,11 +447,11 @@ BI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, { this.combo.populate.apply(this.combo, arguments); }, - showView:function (){ + showView: function () { this.combo.showView(); }, - hideView:function (){ + hideView: function () { this.combo.hideView(); }, From 624c64e8aebb8dc791ecf41bed2389114aee29af Mon Sep 17 00:00:00 2001 From: zsmj Date: Thu, 21 Apr 2022 11:10:09 +0800 Subject: [PATCH 3/4] =?UTF-8?q?Revert=20"=E6=97=A0JIRA=20=20=E5=8E=BB?= =?UTF-8?q?=E6=8E=89=E6=97=A0=E6=84=8F=E4=B9=89=E7=9A=84scrolly"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit eadbe4ec2deee6b1f7cb5da2b74bce3ea02a2c3d. --- src/core/platform/web/config.js | 1 + src/core/wrapper/layout/fill/auto.vtape.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/platform/web/config.js b/src/core/platform/web/config.js index fa310ca1f..3bd279aab 100644 --- a/src/core/platform/web/config.js +++ b/src/core/platform/web/config.js @@ -159,6 +159,7 @@ BI.prepares.push(function () { return BI.extend({ horizontalAlign: BI.HorizontalAlign.Stretch, verticalAlign: BI.VerticalAlign.Stretch, + scrolly: false }, ob, {type: "bi.flex_vertical"}); } if (ob.scrollable === true || ob.scrollx === true || ob.scrolly === true) { diff --git a/src/core/wrapper/layout/fill/auto.vtape.js b/src/core/wrapper/layout/fill/auto.vtape.js index 2086258be..16491ebab 100644 --- a/src/core/wrapper/layout/fill/auto.vtape.js +++ b/src/core/wrapper/layout/fill/auto.vtape.js @@ -1,7 +1,7 @@ BI.AutoVerticalTapeLayout = BI.inherit(BI.Layout, { props: function () { return BI.extend(BI.AutoVerticalTapeLayout.superclass.props.apply(this, arguments), { - baseCls: "bi-auto-vtape", + baseCls: "bi-auto-htape", horizontalAlign: BI.HorizontalAlign.Stretch, verticalAlign: BI.VerticalAlign.Stretch, hgap: 0, From a7120f930ef2bc4cff1bf2822bf26d83b72c1d9c Mon Sep 17 00:00:00 2001 From: zsmj Date: Thu, 21 Apr 2022 11:43:09 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E6=97=A0JIRA=20fix:=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E5=8D=8A=E9=80=89=E6=8C=89=E9=92=AE=E7=9A=84=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/less/base/single/button/button.half.less | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/less/base/single/button/button.half.less b/src/less/base/single/button/button.half.less index b02f0b25b..3f8c1377f 100644 --- a/src/less/base/single/button/button.half.less +++ b/src/less/base/single/button/button.half.less @@ -3,6 +3,7 @@ .bi-half-button { .border-radius(2px); box-sizing: border-box; + &:after { position: absolute; left: 2px; @@ -12,8 +13,8 @@ background-color: @color-bi-background-half-button-content; content: ''; } - &, - .disabled { + + &.disabled { &:after { background-color: @color-bi-background-disabled-half-button-content; }