Browse Source

无jira任务 watch顺序

es6
imp 3 years ago
parent
commit
1a0f5681b6
  1. 14
      dist/fix/fix.compact.js
  2. 5
      src/core/4.widget.js

14
dist/fix/fix.compact.js vendored

@ -146,18 +146,12 @@
needPop && popTarget();
};
var _render = BI.Widget.prototype._render;
BI.Widget.prototype._render = function () {
var needPop = false;
if (_global.Fix && this._store) {
needPop = true;
pushTarget(this.store);
}
_render.apply(this, arguments);
var __initWatch = BI.Widget.prototype.__initWatch;
BI.Widget.prototype.__initWatch = function () {
__initWatch.apply(this, arguments);
if (_global.Fix && this._store) {
initWatch(this, this.watch);
}
needPop && popTarget();
};
var unMount = BI.Widget.prototype.__d;
@ -183,7 +177,7 @@
delete this.__cacheStore;
};
_.each(["__afterRender", "_mount", "__afterMount"], function (name) {
_.each(["_render", "__afterRender", "_mount", "__afterMount"], function (name) {
var old = BI.Widget.prototype[name];
old && (BI.Widget.prototype[name] = function () {
this.store && pushTarget(this.store);

5
src/core/4.widget.js

@ -319,6 +319,10 @@
this._isMounted = false;
},
__initWatch: function () {
// initWatch拦截的方法
},
_initElement: function () {
var self = this;
this.__isMounting = true;
@ -328,6 +332,7 @@
if (BI.isPlainObject(els)) {
els = [els];
}
this.__initWatch();
if (BI.isArray(els)) {
BI.each(els, function (i, el) {
if (el) {

Loading…
Cancel
Save