|
|
|
@ -36009,6 +36009,13 @@ BI.BasicButton = BI.inherit(BI.Single, {
|
|
|
|
|
_init: function () { |
|
|
|
|
BI.BasicButton.superclass._init.apply(this, arguments); |
|
|
|
|
var opts = this.options; |
|
|
|
|
if (opts.selected === true) { |
|
|
|
|
BI.nextTick(BI.bind(function () { |
|
|
|
|
this.setSelected(opts.selected); |
|
|
|
|
}, this)); |
|
|
|
|
} |
|
|
|
|
BI.nextTick(BI.bind(this.bindEvent, this)); |
|
|
|
|
|
|
|
|
|
if (opts.shadow) { |
|
|
|
|
this._createShadow(); |
|
|
|
|
} |
|
|
|
@ -36017,17 +36024,6 @@ BI.BasicButton = BI.inherit(BI.Single, {
|
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
_mount: function () { |
|
|
|
|
var _mount = BI.BasicButton.superclass._mount.apply(this, arguments); |
|
|
|
|
if(_mount === true) { |
|
|
|
|
var o = this.options; |
|
|
|
|
if (o.selected === true) { |
|
|
|
|
this.setSelected(o.selected); |
|
|
|
|
} |
|
|
|
|
this.bindEvent(); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
_createShadow: function () { |
|
|
|
|
var self = this, o = this.options; |
|
|
|
|
|
|
|
|
@ -36184,8 +36180,8 @@ BI.BasicButton = BI.inherit(BI.Single, {
|
|
|
|
|
|
|
|
|
|
// 之后的300ms点击无效
|
|
|
|
|
var onClick = BI.debounce(this._doClick, BI.EVENT_RESPONSE_TIME, { |
|
|
|
|
leading: true, |
|
|
|
|
trailing: false |
|
|
|
|
"leading": true, |
|
|
|
|
"trailing": false |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
function ev (e) { |
|
|
|
@ -36411,13 +36407,10 @@ BI.NodeButton = BI.inherit(BI.BasicButton, {
|
|
|
|
|
|
|
|
|
|
_init: function () { |
|
|
|
|
BI.NodeButton.superclass._init.apply(this, arguments); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
_mount: function () { |
|
|
|
|
var _mount = BI.NodeButton.superclass._mount.apply(this, arguments); |
|
|
|
|
if(_mount === true) { |
|
|
|
|
this.setOpened(this.isOpened()); |
|
|
|
|
} |
|
|
|
|
var self = this; |
|
|
|
|
BI.nextTick(function () { |
|
|
|
|
self.setOpened(self.isOpened()); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
doClick: function () { |
|
|
|
|