Browse Source

Pull request #1809: 无JIRA任务 mounted放到下个宏任务里执行

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

* commit '44b1be6e92739c85a6da0b26fdce2e9481df7e8d':
  mounted放到下个宏任务里执行
master
guy 4 years ago
parent
commit
ef947cc5d0
  1. 6
      src/core/widget.js

6
src/core/widget.js

@ -254,8 +254,10 @@
}
this._mountChildren && this._mountChildren();
if (layer === 0) {
// 最后再统一执行生命周期
this.__afterMount(lifeHook, predicate);
// mounted放到下一个宏任务里执行
setTimeout(function () {
self.__afterMount(lifeHook, predicate);
}, 0);
}
return true;
},

Loading…
Cancel
Save