fineui是帆软报表和BI产品线所使用的前端框架。
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.

50 lines
1.3 KiB

import { shortcut, Widget, createWidget, deepClone } from "@/core";
import { Msg } from "@/base";
7 years ago
@shortcut()
export class SingleLevelTree extends Widget {
static xtype = "demo.single_level_tree";
7 years ago
render() {
const self = this;
const tree = createWidget({
7 years ago
type: "bi.single_level_tree",
items: deepClone(Demo.CONSTANTS.LEVELTREE),
value: "11",
7 years ago
});
return {
type: "bi.vtape",
items: [
{
el: tree,
7 years ago
},
{
el: {
type: "bi.button",
height: 25,
text: "getValue",
handler() {
Msg.alert("", JSON.stringify(tree.getValue()));
},
},
7 years ago
height: 25,
},
{
el: {
type: "bi.button",
height: 25,
text: "setValue (第二级文件1)",
handler() {
tree.setValue(["2"]);
},
},
height: 25,
}
],
7 years ago
width: 500,
hgap: 300,
7 years ago
};
7 years ago
}
}