Browse Source

Merge pull request #298 in FUI/fineui from ~DAILER/fineui:master to master

* commit 'e6b10ffc084a50265e7318341ba30fa49e3f0b5f':
  update
  loader 和createWidgets更新
es6
guy 7 years ago
parent
commit
11d75bc8eb
  1. 18
      dist/bundle.js
  2. 8
      dist/core.js
  3. 10
      dist/fix/fix.compact.js
  4. 8
      src/core/base.js
  5. 8
      utils/utils.js

18
dist/bundle.js vendored

@ -19435,10 +19435,16 @@ if (!window.BI) {
return widget instanceof BI.Widget || (BI.View && widget instanceof BI.View);
},
createWidgets: function (items, options) {
createWidgets: function (items, options, context) {
if (!BI.isArray(items)) {
throw new Error("cannot create Widgets");
}
if (BI.isWidget(options)) {
context = options;
options = {};
} else {
options || (options = {});
}
return BI.map(BI.flatten(items), function (i, item) {
return BI.createWidget(item, BI.deepClone(options));
});
@ -35369,6 +35375,16 @@ Data.Source = BISource = {
return result;
};
$(function () {
var populate = BI.Loader.prototype.populate;
BI.Loader.prototype.populate = function () {
pushContext(this);
var result = populate.apply(this, arguments);
popContext();
return result;
};
});
var _init = BI.Widget.prototype._init;
BI.Widget.prototype._init = function () {
var self = this;

8
dist/core.js vendored

@ -19435,10 +19435,16 @@ if (!window.BI) {
return widget instanceof BI.Widget || (BI.View && widget instanceof BI.View);
},
createWidgets: function (items, options) {
createWidgets: function (items, options, context) {
if (!BI.isArray(items)) {
throw new Error("cannot create Widgets");
}
if (BI.isWidget(options)) {
context = options;
options = {};
} else {
options || (options = {});
}
return BI.map(BI.flatten(items), function (i, item) {
return BI.createWidget(item, BI.deepClone(options));
});

10
dist/fix/fix.compact.js vendored

@ -93,6 +93,16 @@
return result;
};
$(function () {
var populate = BI.Loader.prototype.populate;
BI.Loader.prototype.populate = function () {
pushContext(this);
var result = populate.apply(this, arguments);
popContext();
return result;
};
});
var _init = BI.Widget.prototype._init;
BI.Widget.prototype._init = function () {
var self = this;

8
src/core/base.js

@ -78,10 +78,16 @@ if (!window.BI) {
return widget instanceof BI.Widget || (BI.View && widget instanceof BI.View);
},
createWidgets: function (items, options) {
createWidgets: function (items, options, context) {
if (!BI.isArray(items)) {
throw new Error("cannot create Widgets");
}
if (BI.isWidget(options)) {
context = options;
options = {};
} else {
options || (options = {});
}
return BI.map(BI.flatten(items), function (i, item) {
return BI.createWidget(item, BI.deepClone(options));
});

8
utils/utils.js

@ -10643,10 +10643,16 @@ if (!window.BI) {
return widget instanceof BI.Widget || (BI.View && widget instanceof BI.View);
},
createWidgets: function (items, options) {
createWidgets: function (items, options, context) {
if (!BI.isArray(items)) {
throw new Error("cannot create Widgets");
}
if (BI.isWidget(options)) {
context = options;
options = {};
} else {
options || (options = {});
}
return BI.map(BI.flatten(items), function (i, item) {
return BI.createWidget(item, BI.deepClone(options));
});

Loading…
Cancel
Save