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.
|
|
|
import { shortcut, Widget, createWidget } from "@/core";
|
|
|
|
|
|
|
|
@shortcut()
|
|
|
|
export class Func extends Widget {
|
|
|
|
static xtype = "demo.display_tree";
|
|
|
|
|
|
|
|
props = { baseCls: "demo-func" };
|
|
|
|
|
|
|
|
render() {
|
|
|
|
const tree = createWidget({
|
|
|
|
type: "bi.display_tree",
|
|
|
|
element: this,
|
|
|
|
});
|
|
|
|
|
|
|
|
tree.initTree([
|
|
|
|
{
|
|
|
|
id: 1,
|
|
|
|
text: "第一项",
|
|
|
|
open: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
id: 2,
|
|
|
|
text: "第二项",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
id: 11,
|
|
|
|
pId: 1,
|
|
|
|
text: "子项1(共2个)",
|
|
|
|
open: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
id: 111,
|
|
|
|
pId: 11,
|
|
|
|
text: "子子项1",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
id: 112,
|
|
|
|
pId: 11,
|
|
|
|
text: "子子项2",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
id: 12,
|
|
|
|
pId: 1,
|
|
|
|
text: "子项2",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
id: 13,
|
|
|
|
pId: 1,
|
|
|
|
text: "子项3",
|
|
|
|
}
|
|
|
|
]);
|
|
|
|
}
|
|
|
|
}
|