import { shortcut, Widget, deepClone } from "@/core"; import { Msg } from "@/base"; @shortcut() export class SelectTreeCombo extends Widget { static xtype = "demo.select_tree_combo"; props = { baseCls: "demo-exceltable" }; render() { const self = this; const items = deepClone(Demo.CONSTANTS.LEVELTREE); return { type: "bi.horizontal_auto", items: [ { type: "bi.select_tree_combo", ref(_ref) { self.tree = _ref; }, value: "11", text: "默认值", items, width: 300, }, { type: "bi.button", text: "getVlaue", handler() { Msg.toast(self.tree.getValue()[0]); }, width: 300, }, { type: "bi.button", text: "setVlaue (11)", handler() { self.tree.setValue(["2"]); }, width: 300, } ], vgap: 20, }; } }