|
|
@ -376,6 +376,21 @@ Demo.Button = BI.inherit(BI.Widget, { |
|
|
|
plain: true, |
|
|
|
plain: true, |
|
|
|
disabled: true |
|
|
|
disabled: true |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
}, { |
|
|
|
|
|
|
|
el: { |
|
|
|
|
|
|
|
type: "bi.button", |
|
|
|
|
|
|
|
iconCls: "plus-font", |
|
|
|
|
|
|
|
text: "点我,更改图标", |
|
|
|
|
|
|
|
handler() { |
|
|
|
|
|
|
|
this.i = this.i === undefined ? 0 : ++this.i; |
|
|
|
|
|
|
|
const arr = ["text-background-font", "check-mark-ha-font", "close-font", "search-font", "date-change-h-font"]; |
|
|
|
|
|
|
|
if(this.i >= arr.length) { |
|
|
|
|
|
|
|
this.i = 0; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.setIcon(arr[this.i]); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
height: 24 |
|
|
|
|
|
|
|
} |
|
|
|
}]; |
|
|
|
}]; |
|
|
|
// BI.each(items, function (i, item) {
|
|
|
|
// BI.each(items, function (i, item) {
|
|
|
|
// item.el.handler = function () {
|
|
|
|
// item.el.handler = function () {
|
|
|
|