|
|
|
@ -91,16 +91,8 @@
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
var iconInvisible = !o.loading && !o.iconCls; |
|
|
|
|
if (BI.isPlainObject(o.icon)) { |
|
|
|
|
if (BI.isPlainObject(o.icon) && !o.loading) { |
|
|
|
|
this.icon = BI.createWidget(o.icon); |
|
|
|
|
o.loading ? (this.icon.loading && this.icon.loading()) |
|
|
|
|
: (this.icon.loaded && this.icon.loaded()); |
|
|
|
|
} else { |
|
|
|
|
if (!o.loading && BI.isFunction(o.icon)) { |
|
|
|
|
this.icon = BI.createWidget({ |
|
|
|
|
type: "bi.layout", |
|
|
|
|
}); |
|
|
|
|
o.icon(this.icon.element); |
|
|
|
|
} else { |
|
|
|
|
this.icon = BI.createWidget({ |
|
|
|
|
type: "bi.icon_label", |
|
|
|
@ -114,7 +106,6 @@
|
|
|
|
|
invisible: iconInvisible, |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 用于 whiteSpace
|
|
|
|
|
var textWidth = iconInvisible && o.width ? o.width - o.hgap * 2 : null; |
|
|
|
|