|
|
|
import { extend, shortcut } from "@/core";
|
|
|
|
import { IconButton } from "@/base";
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 十字型的树节点
|
|
|
|
* @class BI.FirstTreeNodeCheckbox
|
|
|
|
* @extends BI.IconButton
|
|
|
|
*/
|
|
|
|
|
|
|
|
@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",
|
|
|
|
iconWidth: 24,
|
|
|
|
iconHeight: 24,
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
getLineCls() {
|
|
|
|
switch (BI.STYLE_CONSTANTS.LINK_LINE_TYPE) {
|
|
|
|
case "solid":
|
|
|
|
return "tree-solid-expand-icon-type2";
|
|
|
|
default:
|
|
|
|
return "tree-expand-icon-type2";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
setSelected(v) {
|
|
|
|
super.setSelected(...arguments);
|
|
|
|
if (v === true) {
|
|
|
|
this.element.addClass(this.getLineCls());
|
|
|
|
} else {
|
|
|
|
this.element.removeClass(this.getLineCls());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|