diff --git a/src/core/ob.js b/src/core/ob.js index 4c617631f..0f5112c7b 100644 --- a/src/core/ob.js +++ b/src/core/ob.js @@ -38,6 +38,7 @@ destroyed: null, _constructor: function () { + this._initProps(); this._init(); this._initRef(); }, @@ -46,12 +47,15 @@ return {}; }, - _init: function () { + _initProps: function () { var props = this.props; if (BI.isFunction(this.props)) { props = this.props(this.__config); } this.options = extend(this._defaultConfig(this.__config), props, this.__config); + }, + + _init: function () { this._initListeners(); this.init && this.init(); }, diff --git a/src/core/shortcut.js b/src/core/shortcut.js index b40cac907..124343230 100644 --- a/src/core/shortcut.js +++ b/src/core/shortcut.js @@ -13,6 +13,7 @@ var widget = new cls(config); + widget._initProps(); widget._init(); widget._initRef();