Browse Source

Pull request #2616: 无JIRA任务 feature: 更新下

Merge in VISUAL/fineui from ~GUY/fineui:master to master

* commit 'dd1f7839f9c93c6fab9bf17a2119bdfdcb2d4faa':
  feature: 更新下
es6
guy 3 years ago
parent
commit
c7b95f4d35
  1. 2
      src/widget/singleselect/singleselect.combo.js
  2. 2
      src/widget/singleselect/singleselect.insert.combo.js
  3. 10
      src/widget/singleselect/singleselect.loader.js
  4. 2
      src/widget/singleselect/singleselect.popup.view.js
  5. 2
      src/widget/singleselect/singleselectlist.insert.js

2
src/widget/singleselect/singleselect.combo.js

@ -10,6 +10,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
baseCls: "bi-single-select-combo", baseCls: "bi-single-select-combo",
allowNoSelect: false, allowNoSelect: false,
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
itemWrapper: BI.emptyFn,
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
height: 24, height: 24,
allowEdit: true allowEdit: true
@ -107,6 +108,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
} }
}], }],
itemsCreator: o.itemsCreator, itemsCreator: o.itemsCreator,
itemWrapper: o.itemWrapper,
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
onLoaded: function () { onLoaded: function () {
BI.nextTick(function () { BI.nextTick(function () {

2
src/widget/singleselect/singleselect.insert.combo.js

@ -10,6 +10,7 @@ BI.SingleSelectInsertCombo = BI.inherit(BI.Single, {
baseCls: "bi-single-select-combo", baseCls: "bi-single-select-combo",
allowNoSelect: false, allowNoSelect: false,
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
itemWrapper: BI.emptyFn,
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
height: 24, height: 24,
allowEdit: true, allowEdit: true,
@ -118,6 +119,7 @@ BI.SingleSelectInsertCombo = BI.inherit(BI.Single, {
} }
}], }],
itemsCreator: o.itemsCreator, itemsCreator: o.itemsCreator,
itemWrapper: o.itemWrapper,
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
onLoaded: function () { onLoaded: function () {
BI.nextTick(function () { BI.nextTick(function () {

10
src/widget/singleselect/singleselect.loader.js

@ -22,6 +22,7 @@ BI.SingleSelectLoader = BI.inherit(BI.Widget, {
allowNoSelect: false, allowNoSelect: false,
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
itemWrapper: BI.emptyFn,
onLoaded: BI.emptyFn onLoaded: BI.emptyFn
}); });
}, },
@ -69,7 +70,12 @@ BI.SingleSelectLoader = BI.inherit(BI.Widget, {
if (op.times === 1 && !BI.isUndefined(self.storeValue)) { if (op.times === 1 && !BI.isUndefined(self.storeValue)) {
var json = BI.map([self.storeValue], function (i, v) { var json = BI.map([self.storeValue], function (i, v) {
var txt = opts.valueFormatter(v) || v; var txt = opts.valueFormatter(v) || v;
return { return opts.itemWrapper({
text: txt,
value: v,
title: txt,
selected: true
}) || {
text: txt, text: txt,
value: v, value: v,
title: txt, title: txt,
@ -117,7 +123,7 @@ BI.SingleSelectLoader = BI.inherit(BI.Widget, {
height: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT, height: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT,
selected: false, selected: false,
iconWrapperWidth: 26, iconWrapperWidth: 26,
hgap: o.allowNoSelect ? 10 : 0, textHgap: o.allowNoSelect ? 10 : 0,
title: item.title || item.text title: item.title || item.text
}, item); }, item);
}); });

2
src/widget/singleselect/singleselect.popup.view.js

@ -14,6 +14,7 @@ BI.SingleSelectPopupView = BI.inherit(BI.Widget, {
maxHeight: 400, maxHeight: 400,
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
itemWrapper: BI.emptyFn,
onLoaded: BI.emptyFn onLoaded: BI.emptyFn
}); });
}, },
@ -26,6 +27,7 @@ BI.SingleSelectPopupView = BI.inherit(BI.Widget, {
type: "bi.single_select_loader", type: "bi.single_select_loader",
allowNoSelect: opts.allowNoSelect, allowNoSelect: opts.allowNoSelect,
itemsCreator: opts.itemsCreator, itemsCreator: opts.itemsCreator,
itemWrapper: opts.itemWrapper,
valueFormatter: opts.valueFormatter, valueFormatter: opts.valueFormatter,
onLoaded: opts.onLoaded, onLoaded: opts.onLoaded,
value: opts.value value: opts.value

2
src/widget/singleselect/singleselectlist.insert.js

@ -9,6 +9,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Single, {
baseCls: "bi-multi-select-insert-list", baseCls: "bi-multi-select-insert-list",
allowNoSelect: false, allowNoSelect: false,
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
itemWrapper: BI.emptyFn,
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
searcherHeight: 24, searcherHeight: 24,
}); });
@ -30,6 +31,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Single, {
cls: "popup-single-select-list bi-border-left bi-border-right bi-border-bottom", cls: "popup-single-select-list bi-border-left bi-border-right bi-border-bottom",
itemsCreator: o.itemsCreator, itemsCreator: o.itemsCreator,
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
itemWrapper: o.itemWrapper,
logic: { logic: {
dynamic: true dynamic: true
}, },

Loading…
Cancel
Save