Browse Source

Merge pull request #779 in VISUAL/fineui from ~DAILER/fineui:master to master

* commit 'e4877b01a33d1eaa18aa3b653fba122ba1d958de':
  update
  loader 私有_populate和公有populate分离
  无jira任务,loader的init方法最后会主动populate,所以this.button_group 就不需要传items进去了.
master
Dailer 6 years ago
parent
commit
3facae2a1b
  1. 14
      dist/base.js
  2. 14
      dist/bundle.ie.js
  3. 26
      dist/bundle.ie.min.js
  4. 14
      dist/bundle.js
  5. 54
      dist/bundle.min.js
  6. 25
      dist/demo.js
  7. 14
      dist/fineui.ie.js
  8. 26
      dist/fineui.ie.min.js
  9. 14
      dist/fineui.js
  10. 52
      dist/fineui.min.js
  11. 14
      dist/fineui_without_jquery_polyfill.js
  12. 2
      dist/utils.min.js
  13. 14
      src/base/combination/loader.js

14
dist/base.js vendored

@ -4069,10 +4069,10 @@ BI.Loader = BI.inherit(BI.Widget, {
})))); }))));
o.isDefaultInit && BI.isEmpty(o.items) && BI.nextTick(BI.bind(function () { o.isDefaultInit && BI.isEmpty(o.items) && BI.nextTick(BI.bind(function () {
o.isDefaultInit && BI.isEmpty(o.items) && this.populate(); o.isDefaultInit && BI.isEmpty(o.items) && this._populate();
}, this)); }, this));
if (BI.isNotEmptyArray(o.items)) { if (BI.isNotEmptyArray(o.items)) {
this.populate(o.items); this._populate(o.items);
} }
}, },
@ -4124,14 +4124,16 @@ BI.Loader = BI.inherit(BI.Widget, {
this.button_group.addItems.apply(this.button_group, arguments); this.button_group.addItems.apply(this.button_group, arguments);
}, },
populate: function (items) {
_populate: function (items) {
var self = this, o = this.options; var self = this, o = this.options;
if (arguments.length === 0 && (BI.isFunction(o.itemsCreator))) { if (arguments.length === 0 && (BI.isFunction(o.itemsCreator))) {
o.itemsCreator.apply(this, [{times: 1}, function () { o.itemsCreator.apply(this, [{times: 1}, function () {
if (arguments.length === 0) { if (arguments.length === 0) {
throw new Error("arguments can not be null!!!"); throw new Error("arguments can not be null!!!");
} }
self.populate.apply(self, arguments); self._populate.apply(self, arguments);
self.button_group.populate.apply(self.button_group, arguments);
o.onLoaded(); o.onLoaded();
}]); }]);
return; return;
@ -4154,6 +4156,10 @@ BI.Loader = BI.inherit(BI.Widget, {
this.prev.invisible(); this.prev.invisible();
} }
} }
},
populate: function () {
this._populate.apply(this, arguments);
this.button_group.populate.apply(this.button_group, arguments); this.button_group.populate.apply(this.button_group, arguments);
}, },

14
dist/bundle.ie.js vendored

@ -39155,10 +39155,10 @@ BI.Loader = BI.inherit(BI.Widget, {
})))); }))));
o.isDefaultInit && BI.isEmpty(o.items) && BI.nextTick(BI.bind(function () { o.isDefaultInit && BI.isEmpty(o.items) && BI.nextTick(BI.bind(function () {
o.isDefaultInit && BI.isEmpty(o.items) && this.populate(); o.isDefaultInit && BI.isEmpty(o.items) && this._populate();
}, this)); }, this));
if (BI.isNotEmptyArray(o.items)) { if (BI.isNotEmptyArray(o.items)) {
this.populate(o.items); this._populate(o.items);
} }
}, },
@ -39210,14 +39210,16 @@ BI.Loader = BI.inherit(BI.Widget, {
this.button_group.addItems.apply(this.button_group, arguments); this.button_group.addItems.apply(this.button_group, arguments);
}, },
populate: function (items) {
_populate: function (items) {
var self = this, o = this.options; var self = this, o = this.options;
if (arguments.length === 0 && (BI.isFunction(o.itemsCreator))) { if (arguments.length === 0 && (BI.isFunction(o.itemsCreator))) {
o.itemsCreator.apply(this, [{times: 1}, function () { o.itemsCreator.apply(this, [{times: 1}, function () {
if (arguments.length === 0) { if (arguments.length === 0) {
throw new Error("arguments can not be null!!!"); throw new Error("arguments can not be null!!!");
} }
self.populate.apply(self, arguments); self._populate.apply(self, arguments);
self.button_group.populate.apply(self.button_group, arguments);
o.onLoaded(); o.onLoaded();
}]); }]);
return; return;
@ -39240,6 +39242,10 @@ BI.Loader = BI.inherit(BI.Widget, {
this.prev.invisible(); this.prev.invisible();
} }
} }
},
populate: function () {
this._populate.apply(this, arguments);
this.button_group.populate.apply(this.button_group, arguments); this.button_group.populate.apply(this.button_group, arguments);
}, },

26
dist/bundle.ie.min.js vendored

File diff suppressed because one or more lines are too long

14
dist/bundle.js vendored

@ -39559,10 +39559,10 @@ BI.Loader = BI.inherit(BI.Widget, {
})))); }))));
o.isDefaultInit && BI.isEmpty(o.items) && BI.nextTick(BI.bind(function () { o.isDefaultInit && BI.isEmpty(o.items) && BI.nextTick(BI.bind(function () {
o.isDefaultInit && BI.isEmpty(o.items) && this.populate(); o.isDefaultInit && BI.isEmpty(o.items) && this._populate();
}, this)); }, this));
if (BI.isNotEmptyArray(o.items)) { if (BI.isNotEmptyArray(o.items)) {
this.populate(o.items); this._populate(o.items);
} }
}, },
@ -39614,14 +39614,16 @@ BI.Loader = BI.inherit(BI.Widget, {
this.button_group.addItems.apply(this.button_group, arguments); this.button_group.addItems.apply(this.button_group, arguments);
}, },
populate: function (items) {
_populate: function (items) {
var self = this, o = this.options; var self = this, o = this.options;
if (arguments.length === 0 && (BI.isFunction(o.itemsCreator))) { if (arguments.length === 0 && (BI.isFunction(o.itemsCreator))) {
o.itemsCreator.apply(this, [{times: 1}, function () { o.itemsCreator.apply(this, [{times: 1}, function () {
if (arguments.length === 0) { if (arguments.length === 0) {
throw new Error("arguments can not be null!!!"); throw new Error("arguments can not be null!!!");
} }
self.populate.apply(self, arguments); self._populate.apply(self, arguments);
self.button_group.populate.apply(self.button_group, arguments);
o.onLoaded(); o.onLoaded();
}]); }]);
return; return;
@ -39644,6 +39646,10 @@ BI.Loader = BI.inherit(BI.Widget, {
this.prev.invisible(); this.prev.invisible();
} }
} }
},
populate: function () {
this._populate.apply(this, arguments);
this.button_group.populate.apply(this.button_group, arguments); this.button_group.populate.apply(this.button_group, arguments);
}, },

54
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

25
dist/demo.js vendored

@ -6126,30 +6126,7 @@ Demo.HtapeLayout = BI.inherit(BI.Widget, {
}; };
} }
}); });
BI.shortcut("demo.htape", Demo.HtapeLayout);Demo.InlineVerticalLayout = BI.inherit(BI.Widget, { BI.shortcut("demo.htape", Demo.HtapeLayout);/**
props: {
baseCls: "demo-absolute"
},
render: function () {
return {
type: "bi.inline_vertical_adapt",
items: [{
type: "bi.label",
text: "绝对布局",
cls: "layout-bg1",
width: 300,
height: 200
}, {
type: "bi.label",
text: "绝对布局",
cls: "layout-bg1",
width: 300,
height: 100
}]
};
}
});
BI.shortcut("demo.inline_vertical", Demo.InlineVerticalLayout);/**
* Created by User on 2017/3/22. * Created by User on 2017/3/22.
*/ */
Demo.LeftRightVerticalAdaptLayout = BI.inherit(BI.Widget, { Demo.LeftRightVerticalAdaptLayout = BI.inherit(BI.Widget, {

14
dist/fineui.ie.js vendored

@ -39397,10 +39397,10 @@ BI.Loader = BI.inherit(BI.Widget, {
})))); }))));
o.isDefaultInit && BI.isEmpty(o.items) && BI.nextTick(BI.bind(function () { o.isDefaultInit && BI.isEmpty(o.items) && BI.nextTick(BI.bind(function () {
o.isDefaultInit && BI.isEmpty(o.items) && this.populate(); o.isDefaultInit && BI.isEmpty(o.items) && this._populate();
}, this)); }, this));
if (BI.isNotEmptyArray(o.items)) { if (BI.isNotEmptyArray(o.items)) {
this.populate(o.items); this._populate(o.items);
} }
}, },
@ -39452,14 +39452,16 @@ BI.Loader = BI.inherit(BI.Widget, {
this.button_group.addItems.apply(this.button_group, arguments); this.button_group.addItems.apply(this.button_group, arguments);
}, },
populate: function (items) {
_populate: function (items) {
var self = this, o = this.options; var self = this, o = this.options;
if (arguments.length === 0 && (BI.isFunction(o.itemsCreator))) { if (arguments.length === 0 && (BI.isFunction(o.itemsCreator))) {
o.itemsCreator.apply(this, [{times: 1}, function () { o.itemsCreator.apply(this, [{times: 1}, function () {
if (arguments.length === 0) { if (arguments.length === 0) {
throw new Error("arguments can not be null!!!"); throw new Error("arguments can not be null!!!");
} }
self.populate.apply(self, arguments); self._populate.apply(self, arguments);
self.button_group.populate.apply(self.button_group, arguments);
o.onLoaded(); o.onLoaded();
}]); }]);
return; return;
@ -39482,6 +39484,10 @@ BI.Loader = BI.inherit(BI.Widget, {
this.prev.invisible(); this.prev.invisible();
} }
} }
},
populate: function () {
this._populate.apply(this, arguments);
this.button_group.populate.apply(this.button_group, arguments); this.button_group.populate.apply(this.button_group, arguments);
}, },

26
dist/fineui.ie.min.js vendored

File diff suppressed because one or more lines are too long

14
dist/fineui.js vendored

@ -39801,10 +39801,10 @@ BI.Loader = BI.inherit(BI.Widget, {
})))); }))));
o.isDefaultInit && BI.isEmpty(o.items) && BI.nextTick(BI.bind(function () { o.isDefaultInit && BI.isEmpty(o.items) && BI.nextTick(BI.bind(function () {
o.isDefaultInit && BI.isEmpty(o.items) && this.populate(); o.isDefaultInit && BI.isEmpty(o.items) && this._populate();
}, this)); }, this));
if (BI.isNotEmptyArray(o.items)) { if (BI.isNotEmptyArray(o.items)) {
this.populate(o.items); this._populate(o.items);
} }
}, },
@ -39856,14 +39856,16 @@ BI.Loader = BI.inherit(BI.Widget, {
this.button_group.addItems.apply(this.button_group, arguments); this.button_group.addItems.apply(this.button_group, arguments);
}, },
populate: function (items) {
_populate: function (items) {
var self = this, o = this.options; var self = this, o = this.options;
if (arguments.length === 0 && (BI.isFunction(o.itemsCreator))) { if (arguments.length === 0 && (BI.isFunction(o.itemsCreator))) {
o.itemsCreator.apply(this, [{times: 1}, function () { o.itemsCreator.apply(this, [{times: 1}, function () {
if (arguments.length === 0) { if (arguments.length === 0) {
throw new Error("arguments can not be null!!!"); throw new Error("arguments can not be null!!!");
} }
self.populate.apply(self, arguments); self._populate.apply(self, arguments);
self.button_group.populate.apply(self.button_group, arguments);
o.onLoaded(); o.onLoaded();
}]); }]);
return; return;
@ -39886,6 +39888,10 @@ BI.Loader = BI.inherit(BI.Widget, {
this.prev.invisible(); this.prev.invisible();
} }
} }
},
populate: function () {
this._populate.apply(this, arguments);
this.button_group.populate.apply(this.button_group, arguments); this.button_group.populate.apply(this.button_group, arguments);
}, },

52
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

14
dist/fineui_without_jquery_polyfill.js vendored

@ -27410,10 +27410,10 @@ BI.Loader = BI.inherit(BI.Widget, {
})))); }))));
o.isDefaultInit && BI.isEmpty(o.items) && BI.nextTick(BI.bind(function () { o.isDefaultInit && BI.isEmpty(o.items) && BI.nextTick(BI.bind(function () {
o.isDefaultInit && BI.isEmpty(o.items) && this.populate(); o.isDefaultInit && BI.isEmpty(o.items) && this._populate();
}, this)); }, this));
if (BI.isNotEmptyArray(o.items)) { if (BI.isNotEmptyArray(o.items)) {
this.populate(o.items); this._populate(o.items);
} }
}, },
@ -27465,14 +27465,16 @@ BI.Loader = BI.inherit(BI.Widget, {
this.button_group.addItems.apply(this.button_group, arguments); this.button_group.addItems.apply(this.button_group, arguments);
}, },
populate: function (items) {
_populate: function (items) {
var self = this, o = this.options; var self = this, o = this.options;
if (arguments.length === 0 && (BI.isFunction(o.itemsCreator))) { if (arguments.length === 0 && (BI.isFunction(o.itemsCreator))) {
o.itemsCreator.apply(this, [{times: 1}, function () { o.itemsCreator.apply(this, [{times: 1}, function () {
if (arguments.length === 0) { if (arguments.length === 0) {
throw new Error("arguments can not be null!!!"); throw new Error("arguments can not be null!!!");
} }
self.populate.apply(self, arguments); self._populate.apply(self, arguments);
self.button_group.populate.apply(self.button_group, arguments);
o.onLoaded(); o.onLoaded();
}]); }]);
return; return;
@ -27495,6 +27497,10 @@ BI.Loader = BI.inherit(BI.Widget, {
this.prev.invisible(); this.prev.invisible();
} }
} }
},
populate: function () {
this._populate.apply(this, arguments);
this.button_group.populate.apply(this.button_group, arguments); this.button_group.populate.apply(this.button_group, arguments);
}, },

2
dist/utils.min.js vendored

File diff suppressed because one or more lines are too long

14
src/base/combination/loader.js

@ -107,10 +107,10 @@ BI.Loader = BI.inherit(BI.Widget, {
})))); }))));
o.isDefaultInit && BI.isEmpty(o.items) && BI.nextTick(BI.bind(function () { o.isDefaultInit && BI.isEmpty(o.items) && BI.nextTick(BI.bind(function () {
o.isDefaultInit && BI.isEmpty(o.items) && this.populate(); o.isDefaultInit && BI.isEmpty(o.items) && this._populate();
}, this)); }, this));
if (BI.isNotEmptyArray(o.items)) { if (BI.isNotEmptyArray(o.items)) {
this.populate(o.items); this._populate(o.items);
} }
}, },
@ -162,14 +162,16 @@ BI.Loader = BI.inherit(BI.Widget, {
this.button_group.addItems.apply(this.button_group, arguments); this.button_group.addItems.apply(this.button_group, arguments);
}, },
populate: function (items) {
_populate: function (items) {
var self = this, o = this.options; var self = this, o = this.options;
if (arguments.length === 0 && (BI.isFunction(o.itemsCreator))) { if (arguments.length === 0 && (BI.isFunction(o.itemsCreator))) {
o.itemsCreator.apply(this, [{times: 1}, function () { o.itemsCreator.apply(this, [{times: 1}, function () {
if (arguments.length === 0) { if (arguments.length === 0) {
throw new Error("arguments can not be null!!!"); throw new Error("arguments can not be null!!!");
} }
self.populate.apply(self, arguments); self._populate.apply(self, arguments);
self.button_group.populate.apply(self.button_group, arguments);
o.onLoaded(); o.onLoaded();
}]); }]);
return; return;
@ -192,6 +194,10 @@ BI.Loader = BI.inherit(BI.Widget, {
this.prev.invisible(); this.prev.invisible();
} }
} }
},
populate: function () {
this._populate.apply(this, arguments);
this.button_group.populate.apply(this.button_group, arguments); this.button_group.populate.apply(this.button_group, arguments);
}, },

Loading…
Cancel
Save