Browse Source

basic_button支持el

es6
guy 3 years ago
parent
commit
06e2ac133a
  1. 7
      src/base/single/button/button.basic.js

7
src/base/single/button/button.basic.js

@ -10,6 +10,7 @@ BI.BasicButton = BI.inherit(BI.Single, {
var conf = BI.BasicButton.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
_baseCls: (conf._baseCls || "") + " bi-basic-button" + (conf.invalid ? "" : " cursor-pointer") + ((BI.isIE() && BI.getIEVersion() < 10) ? " hack" : ""),
// el: {} // 可以通过el来创建button元素
value: "",
stopEvent: false,
stopPropagation: false,
@ -26,6 +27,7 @@ BI.BasicButton = BI.inherit(BI.Single, {
bubble: null
});
},
_init: function () {
BI.BasicButton.superclass._init.apply(this, arguments);
var opts = this.options;
@ -44,6 +46,11 @@ BI.BasicButton = BI.inherit(BI.Single, {
}
},
// 默认render方法
render: function () {
return this.options.el;
},
_createShadow: function () {
var self = this, o = this.options;

Loading…
Cancel
Save