Browse Source

Merge pull request #257751 in DEC/fineui from master to feature/x

* commit '95360f57a96739276f4b5460c001b5c2f5250d7d':
  BI-139985 fix: bi.down_list_popup的bi.down_list_group里只有一个元素的时候没有选中效果
research/test
superman 12 months ago
parent
commit
11824cb177
  1. 50
      packages/fineui/src/widget/downlist/popup.downlist.js

50
packages/fineui/src/widget/downlist/popup.downlist.js

@ -1,23 +1,23 @@
import { ButtonTree, Pane } from "@/base";
import {
Selection,
VerticalLayout,
Layout,
shortcut,
extend,
createWidget,
createItems,
isNotNull,
BlankSplitChar,
contains,
createItems,
createWidget,
deepClone,
each,
extend,
isEmpty,
map,
isNotEmptyString,
isNotEmptyArray,
some,
deepClone,
isNotEmptyString,
isNotNull,
Layout,
map,
Selection,
shortcut,
SIZE_CONSANTS,
BlankSplitChar
some,
VerticalLayout,
} from "@/core";
import { DownListGroup } from "./group.downlist";
@ -63,14 +63,14 @@ export class DownListPopup extends Pane {
{},
{
adjustLength: -2,
}
},
),
layouts: [
{
type: VerticalLayout.xtype,
hgap: this.constants.hgap,
vgap: this.constants.vgap,
}
},
],
value: this._digest(o.value),
chooseType: o.chooseType,
@ -142,7 +142,7 @@ export class DownListPopup extends Pane {
layouts: [
{
type: VerticalLayout.xtype,
}
},
],
},
innerVgap: 5,
@ -163,11 +163,9 @@ export class DownListPopup extends Pane {
item_done.items.push(el_done);
storeItem.push(item);
});
if (this._isGroup(item_done.items)) {
each(item_done.items, (i, item) => {
this.singleValues.push(item.el.value);
});
}
each(item_done.items, (i, item) => {
this.singleValues.push(item.el.value);
});
result.push(item_done);
this.items.push(storeItem);
@ -181,7 +179,7 @@ export class DownListPopup extends Pane {
cls: "bi-down-list-spliter bi-split-top cursor-pointer",
height: 0,
},
}
},
],
cls: "bi-down-list-spliter-container cursor-pointer",
vgap: 5,
@ -220,10 +218,6 @@ export class DownListPopup extends Pane {
});
}
_isGroup(i) {
return i.length > 1;
}
_needSpliter(i, itemLength) {
return i < itemLength - 1;
}
@ -276,7 +270,7 @@ export class DownListPopup extends Pane {
return true;
}
})
}),
);
return value;
@ -295,7 +289,7 @@ export class DownListPopup extends Pane {
{},
{
adjustLength: -2,
}
},
);
this.popup.populate(popupItem);
}

Loading…
Cancel
Save