guy 8 years ago
parent
commit
0418999e0a
  1. 21
      bi/base.js
  2. 21
      docs/base.js
  3. 21
      src/base/single/button/button.basic.js

21
bi/base.js

@ -781,7 +781,7 @@ BI.BasicButton = BI.inherit(BI.Single, {
});
//之后的300ms点击无效
var onClick = BI.debounce(this.doClick, BI.EVENT_RESPONSE_TIME, true);
var onClick = BI.debounce(this._doClick, BI.EVENT_RESPONSE_TIME, true);
function ev(e) {
if (o.stopEvent) {
@ -803,6 +803,11 @@ BI.BasicButton = BI.inherit(BI.Single, {
_trigger: function () {
var o = this.options;
if (!this.isDisableSelected()) {
this.isForceSelected() ? this.setSelected(true) :
(this.isForceNotSelected() ? this.setSelected(false) :
this.setSelected(!this.isSelected()));
}
if (this.isValid()) {
o.handler.call(this, this.getValue(), this);
var v = this.getValue();
@ -811,13 +816,15 @@ BI.BasicButton = BI.inherit(BI.Single, {
}
},
doClick: function () {
if (!this.isDisableSelected()) {
this.isForceSelected() ? this.setSelected(true) :
(this.isForceNotSelected() ? this.setSelected(false) :
this.setSelected(!this.isSelected()));
}
_doClick: function () {
this._trigger();
if (this.isValid()) {
this.doClick();
}
},
doClick: function () {
},
handle: function () {

21
docs/base.js

@ -781,7 +781,7 @@ BI.BasicButton = BI.inherit(BI.Single, {
});
//之后的300ms点击无效
var onClick = BI.debounce(this.doClick, BI.EVENT_RESPONSE_TIME, true);
var onClick = BI.debounce(this._doClick, BI.EVENT_RESPONSE_TIME, true);
function ev(e) {
if (o.stopEvent) {
@ -803,6 +803,11 @@ BI.BasicButton = BI.inherit(BI.Single, {
_trigger: function () {
var o = this.options;
if (!this.isDisableSelected()) {
this.isForceSelected() ? this.setSelected(true) :
(this.isForceNotSelected() ? this.setSelected(false) :
this.setSelected(!this.isSelected()));
}
if (this.isValid()) {
o.handler.call(this, this.getValue(), this);
var v = this.getValue();
@ -811,13 +816,15 @@ BI.BasicButton = BI.inherit(BI.Single, {
}
},
doClick: function () {
if (!this.isDisableSelected()) {
this.isForceSelected() ? this.setSelected(true) :
(this.isForceNotSelected() ? this.setSelected(false) :
this.setSelected(!this.isSelected()));
}
_doClick: function () {
this._trigger();
if (this.isValid()) {
this.doClick();
}
},
doClick: function () {
},
handle: function () {

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

@ -198,7 +198,7 @@ BI.BasicButton = BI.inherit(BI.Single, {
});
//之后的300ms点击无效
var onClick = BI.debounce(this.doClick, BI.EVENT_RESPONSE_TIME, true);
var onClick = BI.debounce(this._doClick, BI.EVENT_RESPONSE_TIME, true);
function ev(e) {
if (o.stopEvent) {
@ -220,6 +220,11 @@ BI.BasicButton = BI.inherit(BI.Single, {
_trigger: function () {
var o = this.options;
if (!this.isDisableSelected()) {
this.isForceSelected() ? this.setSelected(true) :
(this.isForceNotSelected() ? this.setSelected(false) :
this.setSelected(!this.isSelected()));
}
if (this.isValid()) {
o.handler.call(this, this.getValue(), this);
var v = this.getValue();
@ -228,13 +233,15 @@ BI.BasicButton = BI.inherit(BI.Single, {
}
},
doClick: function () {
if (!this.isDisableSelected()) {
this.isForceSelected() ? this.setSelected(true) :
(this.isForceNotSelected() ? this.setSelected(false) :
this.setSelected(!this.isSelected()));
}
_doClick: function () {
this._trigger();
if (this.isValid()) {
this.doClick();
}
},
doClick: function () {
},
handle: function () {

Loading…
Cancel
Save