From 06e2ac133a4009e2bfb09b8c9244f8811b1f7552 Mon Sep 17 00:00:00 2001 From: guy Date: Tue, 9 Nov 2021 00:42:27 +0800 Subject: [PATCH] =?UTF-8?q?basic=5Fbutton=E6=94=AF=E6=8C=81el?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/single/button/button.basic.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/base/single/button/button.basic.js b/src/base/single/button/button.basic.js index 4a5d68a0c..de0ec5ebe 100644 --- a/src/base/single/button/button.basic.js +++ b/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;