Browse Source

Merge pull request #961 in VISUAL/fineui from ~ZHENFEI.LI/fineui:master to master

* commit '0cfd2bf27ba6aec99ee24fc9d768c1d79a735b67':
  BI-46143 feat: 定义SingleSelectItem的事件
es6
guy 6 years ago
parent
commit
ed13f4dafb
  1. 5
      src/case/button/item.singleselect.js

5
src/case/button/item.singleselect.js

@ -42,11 +42,14 @@ BI.SingleSelectItem = BI.inherit(BI.BasicButton, {
doClick: function () { doClick: function () {
BI.SingleSelectItem.superclass.doClick.apply(this, arguments); BI.SingleSelectItem.superclass.doClick.apply(this, arguments);
if (this.isValid()) {
this.fireEvent(BI.MultiSelectItem.EVENT_CHANGE, this.getValue(), this);
}
}, },
setSelected: function (v) { setSelected: function (v) {
BI.SingleSelectItem.superclass.setSelected.apply(this, arguments); BI.SingleSelectItem.superclass.setSelected.apply(this, arguments);
} }
}); });
BI.SingleSelectItem.EVENT_CHANGE = "SingleSelectItem.EVENT_CHANGE";
BI.shortcut("bi.single_select_item", BI.SingleSelectItem); BI.shortcut("bi.single_select_item", BI.SingleSelectItem);
Loading…
Cancel
Save