王川 7 years ago
parent
commit
6650dde091
  1. 18
      demo.css
  2. 11
      demo.js
  3. 11
      demo/js/center.js
  4. 4
      dist/core.js
  5. 4
      src/core/widget.js

18
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;
}

11
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, {

11
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);

4
dist/core.js vendored

@ -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();

4
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();

Loading…
Cancel
Save