forked from fanruan/fineui
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
78 lines
1.8 KiB
78 lines
1.8 KiB
import { BasicButton } from "../../../base/single/button/button.basic"; |
|
import { shortcut, extend } from "../../../core"; |
|
|
|
@shortcut() |
|
export class RootTreeLeafItem extends BasicButton { |
|
static xtype = "bi.root_tree_leaf_item"; |
|
|
|
props = { |
|
baseCls: "bi-root-tree-leaf-item bi-list-item-active", |
|
logic: { |
|
dynamic: false, |
|
}, |
|
id: "", |
|
pId: "", |
|
layer: 0, |
|
height: 24, |
|
} |
|
|
|
render() { |
|
const o = this.options; |
|
const text = { |
|
type: "bi.label", |
|
ref: _ref => { |
|
this.text = _ref; |
|
}, |
|
textAlign: "left", |
|
whiteSpace: "nowrap", |
|
textHeight: o.height, |
|
height: o.height, |
|
hgap: o.hgap, |
|
text: o.text, |
|
value: o.value, |
|
py: o.py, |
|
keyword: o.keyword, |
|
}; |
|
|
|
const type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left); |
|
const items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, { |
|
width: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT, |
|
el: { |
|
type: "bi.layout", |
|
width: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT, |
|
height: o.height, |
|
}, |
|
}, { |
|
el: text, |
|
}); |
|
|
|
return BI.LogicFactory.createLogic(type, extend(o.logic, { |
|
items, |
|
})); |
|
} |
|
|
|
doRedMark() { |
|
this.text.doRedMark(...arguments); |
|
} |
|
|
|
unRedMark() { |
|
this.text.unRedMark(...arguments); |
|
} |
|
|
|
doHighLight() { |
|
this.text.doHighLight(...arguments); |
|
} |
|
|
|
unHighLight() { |
|
this.text.unHighLight(...arguments); |
|
} |
|
|
|
getId() { |
|
return this.options.id; |
|
} |
|
|
|
getPId() { |
|
return this.options.pId; |
|
} |
|
} |
|
|
|
|