Browse Source

Merge remote-tracking branch 'origin/master'

es6
guy 3 years ago
parent
commit
bf6d2e29fa
  1. 2
      package.json
  2. 12
      src/base/combination/group.virtual.js

2
package.json

@ -1,6 +1,6 @@
{
"name": "fineui",
"version": "2.0.20211207112213",
"version": "2.0.20211207164420",
"description": "fineui",
"main": "dist/fineui.min.js",
"types": "dist/lib/index.d.ts",

12
src/base/combination/group.virtual.js

@ -22,12 +22,13 @@ BI.VirtualGroup = BI.inherit(BI.Widget, {
_packageBtns: function (items) {
var o = this.options;
var map = this.buttonMap = {};
for (var i = o.layouts.length - 1; i > 0; i--) {
var layouts = BI.isArray(o.layouts) ? o.layouts : [o.layouts];
for (var i = layouts.length - 1; i > 0; i--) {
items = BI.map(items, function (k, it) {
var el = BI.stripEL(it);
return BI.extend({}, o.layouts[i], {
return BI.extend({}, layouts[i], {
items: [
BI.extend({}, o.layouts[i].el, {
BI.extend({}, layouts[i].el, {
el: BI.extend({
ref: function (_ref) {
if (BI.isKey(map[el.value])) {
@ -44,7 +45,9 @@ BI.VirtualGroup = BI.inherit(BI.Widget, {
},
_packageLayout: function (items) {
var o = this.options, layout = BI.deepClone(o.layouts[0]);
var o = this.options;
var layouts = BI.isArray(o.layouts) ? o.layouts : [o.layouts];
var layout = BI.deepClone(layouts[0]);
var lay = BI.formatEL(layout).el;
while (lay && lay.items && !BI.isEmpty(lay.items)) {
@ -100,7 +103,6 @@ BI.VirtualGroup = BI.inherit(BI.Widget, {
},
populate: function (items) {
var self = this;
items = items || [];
this.options.items = items;
items = this._packageBtns(items);

Loading…
Cancel
Save