Skip to content

Commit

Permalink
opti toPhase perf
Browse files Browse the repository at this point in the history
  • Loading branch information
errorrik committed Jan 13, 2020
1 parent 199e1b5 commit 9457281
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/view/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,8 @@ Component.prototype._toPhase = function (name) {
if (typeof this[name] === 'function') {
this[name]();
}
this['_after' + name] = 1;

this._afterLife = this.lifeCycle;

// 通知devtool
// #[begin] devtool
Expand Down Expand Up @@ -798,7 +799,7 @@ Component.prototype._initDataChanger = function (change) {
var me = this;

this._dataChanger = function (change) {
if (me.lifeCycle.created && me._aftercreated) {
if (me._afterLife.created) {
if (!me._dataChanges) {
nextTick(me._update, me);
me._dataChanges = [];
Expand Down

0 comments on commit 9457281

Please sign in to comment.