|
|
@ -3,31 +3,36 @@ |
|
|
|
* @class BI.FirstTreeNodeCheckbox |
|
|
|
* @class BI.FirstTreeNodeCheckbox |
|
|
|
* @extends BI.IconButton |
|
|
|
* @extends BI.IconButton |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
BI.FirstTreeNodeCheckbox = BI.inherit(BI.IconButton, { |
|
|
|
import { extend, shortcut } from "@/core"; |
|
|
|
_defaultConfig: function () { |
|
|
|
import { IconButton } from "@/base"; |
|
|
|
return BI.extend( BI.FirstTreeNodeCheckbox.superclass._defaultConfig.apply(this, arguments), { |
|
|
|
|
|
|
|
|
|
|
|
@shortcut() |
|
|
|
|
|
|
|
export class FirstTreeNodeCheckbox extends IconButton { |
|
|
|
|
|
|
|
static xtype = "bi.first_tree_node_checkbox"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_defaultConfig() { |
|
|
|
|
|
|
|
return extend(super._defaultConfig(...arguments), { |
|
|
|
extraCls: BI.STYLE_CONSTANTS.LINK_LINE_TYPE === "solid" ? "tree-solid-collapse-icon-type2" : "tree-collapse-icon-type2", |
|
|
|
extraCls: BI.STYLE_CONSTANTS.LINK_LINE_TYPE === "solid" ? "tree-solid-collapse-icon-type2" : "tree-collapse-icon-type2", |
|
|
|
iconWidth: 24, |
|
|
|
iconWidth: 24, |
|
|
|
iconHeight: 24 |
|
|
|
iconHeight: 24, |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
getLineCls: function () { |
|
|
|
getLineCls() { |
|
|
|
switch (BI.STYLE_CONSTANTS.LINK_LINE_TYPE) { |
|
|
|
switch (BI.STYLE_CONSTANTS.LINK_LINE_TYPE) { |
|
|
|
case "solid": |
|
|
|
case "solid": |
|
|
|
return "tree-solid-expand-icon-type2"; |
|
|
|
return "tree-solid-expand-icon-type2"; |
|
|
|
default: |
|
|
|
default: |
|
|
|
return "tree-expand-icon-type2"; |
|
|
|
return "tree-expand-icon-type2"; |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
setSelected: function (v) { |
|
|
|
setSelected(v) { |
|
|
|
BI.FirstTreeNodeCheckbox.superclass.setSelected.apply(this, arguments); |
|
|
|
super.setSelected(...arguments); |
|
|
|
if (v === true) { |
|
|
|
if (v === true) { |
|
|
|
this.element.addClass(this.getLineCls()); |
|
|
|
this.element.addClass(this.getLineCls()); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
this.element.removeClass(this.getLineCls()); |
|
|
|
this.element.removeClass(this.getLineCls()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
BI.shortcut("bi.first_tree_node_checkbox", BI.FirstTreeNodeCheckbox); |
|
|
|
|
|
|
|