diff --git a/demo.css b/demo.css index b601e3e33..8c620b3db 100644 --- a/demo.css +++ b/demo.css @@ -7,21 +7,3 @@ .demo-west { background-color: #222d32; } -.demo-main .bg1 { - background-color: #178cdf; -} -.demo-north { - background-color: #3c8dbc; -} -.demo-west { - background-color: #222d32; -} -.demo-main .bg1 { - background-color: #178cdf; -} -.demo-north { - background-color: #3c8dbc; -} -.demo-west { - background-color: #222d32; -} diff --git a/demo.js b/demo.js index 6b26e7b8f..835c14521 100644 --- a/demo.js +++ b/demo.js @@ -15,8 +15,17 @@ Demo = { props: { baseCls: "demo-center" }, + beforeCreate: function(){ + console.log("beforeCreate"); + }, render: function () { - + console.log("render"); + }, + created: function () { + console.log("created"); + }, + mounted: function () { + console.log("mounted"); } }); $.shortcut("demo.center", Demo.Center);Demo.Main = BI.inherit(BI.Widget, { diff --git a/demo/js/center.js b/demo/js/center.js index 6a71ea741..c3051dcf6 100644 --- a/demo/js/center.js +++ b/demo/js/center.js @@ -2,8 +2,17 @@ Demo.Center = BI.inherit(BI.Widget, { props: { baseCls: "demo-center" }, + beforeCreate: function(){ + console.log("beforeCreate"); + }, render: function () { - + console.log("render"); + }, + created: function () { + console.log("created"); + }, + mounted: function () { + console.log("mounted"); } }); $.shortcut("demo.center", Demo.Center); \ No newline at end of file diff --git a/dist/core.js b/dist/core.js index 86a4e0216..7e2871faf 100644 --- a/dist/core.js +++ b/dist/core.js @@ -14159,7 +14159,7 @@ BI.Widget = BI.inherit(BI.OB, { }, //生命周期函数 - beforeCreated: function () { + beforeCreate: function () { }, @@ -14184,7 +14184,7 @@ BI.Widget = BI.inherit(BI.OB, { _init: function () { BI.Widget.superclass._init.apply(this, arguments); - this.beforeCreated(); + this.beforeCreate(); this._initRoot(); this._initElementWidth(); this._initElementHeight(); diff --git a/src/core/widget.js b/src/core/widget.js index cf55061ee..799934f2e 100644 --- a/src/core/widget.js +++ b/src/core/widget.js @@ -22,7 +22,7 @@ BI.Widget = BI.inherit(BI.OB, { }, //生命周期函数 - beforeCreated: function () { + beforeCreate: function () { }, @@ -47,7 +47,7 @@ BI.Widget = BI.inherit(BI.OB, { _init: function () { BI.Widget.superclass._init.apply(this, arguments); - this.beforeCreated(); + this.beforeCreate(); this._initRoot(); this._initElementWidth(); this._initElementHeight();