From 1e0a99cc8c0a0f70e0e9e4b77e18ac848be1c3d8 Mon Sep 17 00:00:00 2001 From: fay Date: Tue, 15 Sep 2020 14:21:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1=20=E8=87=AA?= =?UTF-8?q?=E5=AE=9A=E4=B9=89item=E9=AB=98=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/widget/multiselect/multiselect.combo.js | 3 +++ src/widget/multiselect/multiselect.combo.nobar.js | 3 +++ src/widget/multiselect/multiselect.insert.combo.js | 3 +++ src/widget/multiselect/multiselect.insert.combo.nobar.js | 3 +++ src/widget/multiselect/multiselect.insert.trigger.js | 2 ++ src/widget/multiselect/multiselect.loader.js | 5 +++-- src/widget/multiselect/multiselect.loader.nobar.js | 3 ++- src/widget/multiselect/multiselect.popup.view.js | 4 +++- src/widget/multiselect/multiselect.popup.view.nobar.js | 2 ++ src/widget/multiselect/multiselect.trigger.js | 4 +++- .../multiselect/search/multiselect.search.insert.pane.js | 4 +++- src/widget/multiselect/search/multiselect.search.loader.js | 5 +++-- src/widget/multiselect/search/multiselect.search.pane.js | 4 +++- .../multiselect/trigger/searcher.multiselect.insert.js | 2 ++ src/widget/multiselect/trigger/searcher.multiselect.js | 4 +++- src/widget/multiselectlist/multiselectlist.insert.js | 3 +++ src/widget/multiselectlist/multiselectlist.insert.nobar.js | 1 + src/widget/multiselectlist/multiselectlist.js | 7 +++++-- 18 files changed, 50 insertions(+), 12 deletions(-) diff --git a/src/widget/multiselect/multiselect.combo.js b/src/widget/multiselect/multiselect.combo.js index 4880c5df7..2dcf68938 100644 --- a/src/widget/multiselect/multiselect.combo.js +++ b/src/widget/multiselect/multiselect.combo.js @@ -10,6 +10,7 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, { baseCls: "bi-multi-select-combo", itemsCreator: BI.emptyFn, valueFormatter: BI.emptyFn, + itemHeight: 24, height: 24, attributes: { tabIndex: 0 @@ -60,6 +61,7 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, { }, valueFormatter: o.valueFormatter, itemsCreator: BI.bind(this._itemsCreator4Trigger, this), + itemHeight: o.itemHeight, value: this.storeValue }); @@ -170,6 +172,7 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, { } }], itemsCreator: o.itemsCreator, + itemsHeight: o.itemsHeight, valueFormatter: o.valueFormatter, onLoaded: function () { BI.nextTick(function () { diff --git a/src/widget/multiselect/multiselect.combo.nobar.js b/src/widget/multiselect/multiselect.combo.nobar.js index 81045f049..34bfaf8f1 100644 --- a/src/widget/multiselect/multiselect.combo.nobar.js +++ b/src/widget/multiselect/multiselect.combo.nobar.js @@ -10,6 +10,7 @@ BI.MultiSelectNoBarCombo = BI.inherit(BI.Single, { baseCls: "bi-multi-select-combo-no-bar", itemsCreator: BI.emptyFn, valueFormatter: BI.emptyFn, + itemHeight: 24, height: 24, attributes: { tabIndex: 0 @@ -57,6 +58,7 @@ BI.MultiSelectNoBarCombo = BI.inherit(BI.Single, { }, valueFormatter: o.valueFormatter, itemsCreator: BI.bind(this._itemsCreator4Trigger, this), + itemHeight: o.itemHeight, value: { type: BI.Selection.Multi, value: o.value @@ -160,6 +162,7 @@ BI.MultiSelectNoBarCombo = BI.inherit(BI.Single, { } }], itemsCreator: o.itemsCreator, + itemHeight: o.itemHeight, valueFormatter: o.valueFormatter, onLoaded: function () { BI.nextTick(function () { diff --git a/src/widget/multiselect/multiselect.insert.combo.js b/src/widget/multiselect/multiselect.insert.combo.js index a9e56c9c1..3cb876235 100644 --- a/src/widget/multiselect/multiselect.insert.combo.js +++ b/src/widget/multiselect/multiselect.insert.combo.js @@ -11,6 +11,7 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, { itemsCreator: BI.emptyFn, valueFormatter: BI.emptyFn, height: 24, + itemHeight: 24, attributes: { tabIndex: 0 }, @@ -57,6 +58,7 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, { }, valueFormatter: o.valueFormatter, itemsCreator: BI.bind(this._itemsCreator4Trigger, this), + itemHeight: o.itemHeight, value: o.value }); @@ -166,6 +168,7 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, { }], itemsCreator: o.itemsCreator, valueFormatter: o.valueFormatter, + itemHeight: o.itemHeight, onLoaded: function () { BI.nextTick(function () { self.combo.adjustWidth(); diff --git a/src/widget/multiselect/multiselect.insert.combo.nobar.js b/src/widget/multiselect/multiselect.insert.combo.nobar.js index 70e1ab405..5e31b801f 100644 --- a/src/widget/multiselect/multiselect.insert.combo.nobar.js +++ b/src/widget/multiselect/multiselect.insert.combo.nobar.js @@ -10,6 +10,7 @@ BI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, { baseCls: "bi-multi-select-insert-combo-no-bar", itemsCreator: BI.emptyFn, valueFormatter: BI.emptyFn, + itemsHeight: 24, height: 24, attributes: { tabIndex: 0 @@ -57,6 +58,7 @@ BI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, { }, valueFormatter: o.valueFormatter, itemsCreator: BI.bind(this._itemsCreator4Trigger, this), + itemHeight: o.itemHeight, value: { type: BI.Selection.Multi, value: o.value @@ -157,6 +159,7 @@ BI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, { } }], itemsCreator: o.itemsCreator, + itemHeight: o.itemHeight, valueFormatter: o.valueFormatter, onLoaded: function () { BI.nextTick(function () { diff --git a/src/widget/multiselect/multiselect.insert.trigger.js b/src/widget/multiselect/multiselect.insert.trigger.js index d85721577..e9c6c4d51 100644 --- a/src/widget/multiselect/multiselect.insert.trigger.js +++ b/src/widget/multiselect/multiselect.insert.trigger.js @@ -18,6 +18,7 @@ BI.MultiSelectInsertTrigger = BI.inherit(BI.Trigger, { baseCls: "bi-multi-select-trigger bi-border bi-border-radius", itemsCreator: BI.emptyFn, valueFormatter: BI.emptyFn, + itemHeight: 24, searcher: {}, switcher: {}, @@ -41,6 +42,7 @@ BI.MultiSelectInsertTrigger = BI.inherit(BI.Trigger, { text: o.text, itemsCreator: o.itemsCreator, valueFormatter: o.valueFormatter, + itemHeight: o.itemHeight, watermark: o.watermark, popup: {}, adapter: o.adapter, diff --git a/src/widget/multiselect/multiselect.loader.js b/src/widget/multiselect/multiselect.loader.js index 53e4466b6..c08483976 100644 --- a/src/widget/multiselect/multiselect.loader.js +++ b/src/widget/multiselect/multiselect.loader.js @@ -17,7 +17,8 @@ BI.MultiSelectLoader = BI.inherit(BI.Widget, { }, valueFormatter: BI.emptyFn, itemsCreator: BI.emptyFn, - onLoaded: BI.emptyFn + onLoaded: BI.emptyFn, + itemHeight: 24 }); }, @@ -125,7 +126,7 @@ BI.MultiSelectLoader = BI.inherit(BI.Widget, { type: "bi.multi_select_item", logic: this.options.logic, cls: "bi-list-item-active", - height: 24, + height: this.options.itemHeight, selected: this.isAllSelected(), iconWrapperWidth: 36 }); diff --git a/src/widget/multiselect/multiselect.loader.nobar.js b/src/widget/multiselect/multiselect.loader.nobar.js index e5b481ec1..46bcdbe4b 100644 --- a/src/widget/multiselect/multiselect.loader.nobar.js +++ b/src/widget/multiselect/multiselect.loader.nobar.js @@ -17,6 +17,7 @@ BI.MultiSelectNoBarLoader = BI.inherit(BI.Widget, { }, valueFormatter: BI.emptyFn, itemsCreator: BI.emptyFn, + itemHeight: 24, onLoaded: BI.emptyFn }); }, @@ -116,7 +117,7 @@ BI.MultiSelectNoBarLoader = BI.inherit(BI.Widget, { type: "bi.multi_select_item", cls: "bi-list-item-active", logic: this.options.logic, - height: 24, + height: this.options.itemHeight, iconWrapperWidth: 36 }); }, diff --git a/src/widget/multiselect/multiselect.popup.view.js b/src/widget/multiselect/multiselect.popup.view.js index 50f863d63..1343eb2f0 100644 --- a/src/widget/multiselect/multiselect.popup.view.js +++ b/src/widget/multiselect/multiselect.popup.view.js @@ -13,7 +13,8 @@ BI.MultiSelectPopupView = BI.inherit(BI.Widget, { maxHeight: 400, valueFormatter: BI.emptyFn, itemsCreator: BI.emptyFn, - onLoaded: BI.emptyFn + onLoaded: BI.emptyFn, + itemHeight: 24, }); }, @@ -24,6 +25,7 @@ BI.MultiSelectPopupView = BI.inherit(BI.Widget, { this.loader = BI.createWidget({ type: "bi.multi_select_loader", itemsCreator: opts.itemsCreator, + itemHeight: opts.itemHeight, valueFormatter: opts.valueFormatter, onLoaded: opts.onLoaded, value: opts.value diff --git a/src/widget/multiselect/multiselect.popup.view.nobar.js b/src/widget/multiselect/multiselect.popup.view.nobar.js index 3f309bf6c..55428df4f 100644 --- a/src/widget/multiselect/multiselect.popup.view.nobar.js +++ b/src/widget/multiselect/multiselect.popup.view.nobar.js @@ -13,6 +13,7 @@ BI.MultiSelectNoBarPopupView = BI.inherit(BI.Widget, { maxHeight: 400, valueFormatter: BI.emptyFn, itemsCreator: BI.emptyFn, + itemHeight: 24, onLoaded: BI.emptyFn }); }, @@ -24,6 +25,7 @@ BI.MultiSelectNoBarPopupView = BI.inherit(BI.Widget, { this.loader = BI.createWidget({ type: "bi.multi_select_no_bar_loader", itemsCreator: opts.itemsCreator, + itemHeight: opts.itemHeight, valueFormatter: opts.valueFormatter, onLoaded: opts.onLoaded, value: opts.value diff --git a/src/widget/multiselect/multiselect.trigger.js b/src/widget/multiselect/multiselect.trigger.js index 642db0f72..7c4ff6295 100644 --- a/src/widget/multiselect/multiselect.trigger.js +++ b/src/widget/multiselect/multiselect.trigger.js @@ -23,7 +23,8 @@ BI.MultiSelectTrigger = BI.inherit(BI.Trigger, { adapter: null, masker: {}, - allowEdit: true + allowEdit: true, + itemHeight: 24 }); }, @@ -40,6 +41,7 @@ BI.MultiSelectTrigger = BI.inherit(BI.Trigger, { height: o.height, text: o.text, itemsCreator: o.itemsCreator, + itemHeight: o.itemHeight, valueFormatter: o.valueFormatter, watermark: o.watermark, popup: {}, diff --git a/src/widget/multiselect/search/multiselect.search.insert.pane.js b/src/widget/multiselect/search/multiselect.search.insert.pane.js index f09c8cf86..6879a7b6f 100644 --- a/src/widget/multiselect/search/multiselect.search.insert.pane.js +++ b/src/widget/multiselect/search/multiselect.search.insert.pane.js @@ -18,7 +18,8 @@ BI.MultiSelectSearchInsertPane = BI.inherit(BI.Widget, { baseCls: "bi-multi-select-search-pane bi-card", itemsCreator: BI.emptyFn, valueFormatter: BI.emptyFn, - keywordGetter: BI.emptyFn + keywordGetter: BI.emptyFn, + itemHeight: 24 }); }, @@ -56,6 +57,7 @@ BI.MultiSelectSearchInsertPane = BI.inherit(BI.Widget, { self.setKeyword(o.keywordGetter()); }]); }, + itemHeight: o.itemHeight, value: o.value }); this.loader.on(BI.Controller.EVENT_CHANGE, function () { diff --git a/src/widget/multiselect/search/multiselect.search.loader.js b/src/widget/multiselect/search/multiselect.search.loader.js index 7d6f1c178..2ea43383c 100644 --- a/src/widget/multiselect/search/multiselect.search.loader.js +++ b/src/widget/multiselect/search/multiselect.search.loader.js @@ -11,7 +11,8 @@ BI.MultiSelectSearchLoader = BI.inherit(BI.Widget, { baseCls: "bi-multi-select-search-loader", itemsCreator: BI.emptyFn, keywordGetter: BI.emptyFn, - valueFormatter: BI.emptyFn + valueFormatter: BI.emptyFn, + itemHeight: 24 }); }, @@ -91,7 +92,7 @@ BI.MultiSelectSearchLoader = BI.inherit(BI.Widget, { logic: { dynamic: false }, - height: 24, + height: this.options.itemHeight, selected: this.isAllSelected(), cls: "bi-list-item-active", iconWrapperWidth: 36 diff --git a/src/widget/multiselect/search/multiselect.search.pane.js b/src/widget/multiselect/search/multiselect.search.pane.js index 1d4db7385..b1c18adda 100644 --- a/src/widget/multiselect/search/multiselect.search.pane.js +++ b/src/widget/multiselect/search/multiselect.search.pane.js @@ -18,7 +18,8 @@ BI.MultiSelectSearchPane = BI.inherit(BI.Widget, { baseCls: "bi-multi-select-search-pane bi-card", itemsCreator: BI.emptyFn, valueFormatter: BI.emptyFn, - keywordGetter: BI.emptyFn + keywordGetter: BI.emptyFn, + itemHeight: 24, }); }, @@ -44,6 +45,7 @@ BI.MultiSelectSearchPane = BI.inherit(BI.Widget, { self.setKeyword(o.keywordGetter()); }]); }, + itemHeight: o.itemHeight, value: o.value }); this.loader.on(BI.Controller.EVENT_CHANGE, function () { diff --git a/src/widget/multiselect/trigger/searcher.multiselect.insert.js b/src/widget/multiselect/trigger/searcher.multiselect.insert.js index 9cf47dea9..0300fc8ee 100644 --- a/src/widget/multiselect/trigger/searcher.multiselect.insert.js +++ b/src/widget/multiselect/trigger/searcher.multiselect.insert.js @@ -10,6 +10,7 @@ BI.MultiSelectInsertSearcher = BI.inherit(BI.Widget, { return BI.extend(BI.MultiSelectInsertSearcher.superclass._defaultConfig.apply(this, arguments), { baseCls: "bi-multi-select-searcher", itemsCreator: BI.emptyFn, + itemHeight: 24, el: {}, popup: {}, valueFormatter: BI.emptyFn, @@ -64,6 +65,7 @@ BI.MultiSelectInsertSearcher = BI.inherit(BI.Widget, { this.setKeyword(keyword); o.itemsCreator(op, callback); }, + itemHeight: o.itemHeight, value: o.value, listeners: [{ eventName: BI.MultiSelectSearchInsertPane.EVENT_ADD_ITEM, diff --git a/src/widget/multiselect/trigger/searcher.multiselect.js b/src/widget/multiselect/trigger/searcher.multiselect.js index 60ba6990f..5eb79a0e1 100644 --- a/src/widget/multiselect/trigger/searcher.multiselect.js +++ b/src/widget/multiselect/trigger/searcher.multiselect.js @@ -15,7 +15,8 @@ BI.MultiSelectSearcher = BI.inherit(BI.Widget, { valueFormatter: BI.emptyFn, adapter: null, masker: {}, - text: BI.i18nText("BI-Basic_Please_Select") + text: BI.i18nText("BI-Basic_Please_Select"), + itemHeight: 24 }); }, @@ -64,6 +65,7 @@ BI.MultiSelectSearcher = BI.inherit(BI.Widget, { this.setKeyword(keyword); o.itemsCreator(op, callback); }, + itemHeight: o.itemHeight, value: o.value }, o.popup), diff --git a/src/widget/multiselectlist/multiselectlist.insert.js b/src/widget/multiselectlist/multiselectlist.insert.js index 6655bbb95..92997febe 100644 --- a/src/widget/multiselectlist/multiselectlist.insert.js +++ b/src/widget/multiselectlist/multiselectlist.insert.js @@ -8,6 +8,7 @@ BI.MultiSelectInsertList = BI.inherit(BI.Single, { itemsCreator: BI.emptyFn, valueFormatter: BI.emptyFn, searcherHeight: 24, + itemHeight: 24 }); }, _init: function () { @@ -25,6 +26,7 @@ BI.MultiSelectInsertList = BI.inherit(BI.Single, { type: "bi.multi_select_loader", cls: "popup-multi-select-list bi-border-left bi-border-right bi-border-bottom", itemsCreator: o.itemsCreator, + itemHeight: o.itemHeight, valueFormatter: o.valueFormatter, logic: { dynamic: false @@ -54,6 +56,7 @@ BI.MultiSelectInsertList = BI.inherit(BI.Single, { o.itemsCreator(op, callback); } }, + itemHeight: o.itemHeight, listeners: [{ eventName: BI.MultiSelectSearchInsertPane.EVENT_ADD_ITEM, action: function () { diff --git a/src/widget/multiselectlist/multiselectlist.insert.nobar.js b/src/widget/multiselectlist/multiselectlist.insert.nobar.js index b0463e60e..421b925af 100644 --- a/src/widget/multiselectlist/multiselectlist.insert.nobar.js +++ b/src/widget/multiselectlist/multiselectlist.insert.nobar.js @@ -28,6 +28,7 @@ BI.MultiSelectInsertNoBarList = BI.inherit(BI.Single, { type: "bi.multi_select_no_bar_loader", cls: "popup-multi-select-list bi-border-left bi-border-right bi-border-bottom", itemsCreator: o.itemsCreator, + itemHeight: o.itemHeight, valueFormatter: o.valueFormatter, logic: { dynamic: false diff --git a/src/widget/multiselectlist/multiselectlist.js b/src/widget/multiselectlist/multiselectlist.js index 3c60972fa..12f030048 100644 --- a/src/widget/multiselectlist/multiselectlist.js +++ b/src/widget/multiselectlist/multiselectlist.js @@ -7,7 +7,8 @@ BI.MultiSelectList = BI.inherit(BI.Widget, { baseCls: "bi-multi-select-list", itemsCreator: BI.emptyFn, valueFormatter: BI.emptyFn, - searcherHeight: 24 + searcherHeight: 24, + itemHeight: 24 }); }, _init: function () { @@ -26,6 +27,7 @@ BI.MultiSelectList = BI.inherit(BI.Widget, { cls: "popup-multi-select-list bi-border-left bi-border-right bi-border-bottom", itemsCreator: o.itemsCreator, valueFormatter: o.valueFormatter, + itemHeight: o.itemHeight, logic: { dynamic: false }, @@ -54,7 +56,8 @@ BI.MultiSelectList = BI.inherit(BI.Widget, { this.setKeyword(op.keywords[0]); o.itemsCreator(op, callback); } - } + }, + itemHeight: o.itemHeight }); this.searcherPane.setVisible(false);