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.

58 lines
1.8 KiB

import { shortcut, Widget, createWidget } from "@/core";
8 years ago
@shortcut()
export class Func extends Widget {
static xtype = "demo.tree_view";
props = { baseCls: "demo-func" };
_createDefaultTree() {
const tree = createWidget({
type: "bi.tree_view",
8 years ago
});
tree.initTree([
{ id: 1, pId: 0, text: "test1", open: true },
{ id: 11, pId: 1, text: "test11" },
{ id: 12, pId: 1, text: "test12" },
{ id: 111, pId: 11, text: "test111" },
{ id: 2, pId: 0, text: "test2", open: true },
{ id: 21, pId: 2, text: "test21" },
{ id: 22, pId: 2, text: "test22" }
7 years ago
]);
8 years ago
return tree;
}
8 years ago
render() {
const self = this;
createWidget({
8 years ago
type: "bi.grid",
columns: 1,
rows: 1,
element: this,
items: [
{
column: 0,
row: 0,
el: {
type: "bi.vtape",
items: [
{
el: this._createDefaultTree(),
8 years ago
},
{
el: {
type: "bi.label",
text: "tree.initTree([{\"id\":1, \"pId\":0, \"text\":\"test1\", open:true},{\"id\":11, \"pId\":1, \"text\":\"test11\"},{\"id\":12, \"pId\":1, \"text\":\"test12\"},{\"id\":111, \"pId\":11, \"text\":\"test111\"}])",
whiteSpace: "normal",
},
height: 50,
}
],
},
8 years ago
}
],
7 years ago
});
8 years ago
}
}