import { BasicButton } from "../../../base/single/button/button.basic"; import { shortcut, extend, createWidget } from "../../../core"; /** * 树叶子节点 * Created by GUY on 2015/9/6. * @class BI.TreeTextLeafItem * @extends BI.BasicButton */ @shortcut() export class TreeTextLeafItem extends BasicButton { static xtype = "bi.tree_text_leaf_item"; _defaultConfig() { return extend(super._defaultConfig.apply(this, arguments), { extraCls: "bi-tree-text-leaf-item bi-list-item-active", id: "", pId: "", height: 24, hgap: 0, lgap: 0, rgap: 0, }); } _init() { super._init(...arguments); const o = this.options; this.text = createWidget({ type: "bi.label", textAlign: "left", whiteSpace: "nowrap", textHeight: o.height, height: o.height, hgap: o.hgap, lgap: o.lgap, rgap: o.hgap, text: o.text, value: o.value, py: o.py, keyword: o.keyword, }); createWidget({ type: "bi.htape", element: this, items: [{ el: this.text, }], }); } 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; } }