Browse Source

生命周期函数支持promise

es6
guy 3 years ago
parent
commit
0887ea044d
  1. 2
      src/core/4.widget.js

2
src/core/4.widget.js

@ -135,7 +135,7 @@
self.__async = true;
var beforeRenderResult = (self.options.beforeRender || self.beforeRender).call(self, render);
if (beforeRenderResult instanceof Promise) {
beforeRenderResult.then(init);
beforeRenderResult.then(render);
}
} else {
self._render();

Loading…
Cancel
Save