Browse Source

Pull request #1603: 无JIRA任务 生命周期可以通过属性传递

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

* commit '370b2fd617257d3d9df223355bacb79aa59d5eaa':
  生命周期可以通过属性传递
es6
guy 4 years ago
parent
commit
44924a4327
  1. 18
      src/core/widget.js

18
src/core/widget.js

@ -544,7 +544,22 @@
return current.$storeDelegate; return current.$storeDelegate;
} }
if (current) { if (current) {
var delegate = {}; var delegate = {}, origin;
if (_global.Proxy) {
var proxy = new Proxy(delegate, {
get: function (target, key) {
return Reflect.get(origin, key);
},
set: function (target, key, value) {
return Reflect.set(origin, key, value);
}
});
current._store = function () {
origin = _store.apply(this, arguments);
return origin;
};
return current.$storeDelegate = proxy;
}
current._store = function () { current._store = function () {
var st = _store.apply(this, arguments); var st = _store.apply(this, arguments);
BI.extend(delegate, st); BI.extend(delegate, st);
@ -660,4 +675,3 @@
return widget._mount(true, false, false, predicate); return widget._mount(true, false, false, predicate);
}; };
})(); })();

Loading…
Cancel
Save