Browse Source

Pull request #2275: 无JIRA任务 basic_button支持el

Merge in VISUAL/fineui from ~GUY/fineui:master to master

* commit '06e2ac133a4009e2bfb09b8c9244f8811b1f7552':
  basic_button支持el
es6
guy 3 years ago
parent
commit
77d6d2ee5b
  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