193 lines
4.3 KiB
Plaintext
193 lines
4.3 KiB
Plaintext
import { IBestTree, IBestTreeController, IBestTreeData, IBestTreeNodeData } from "@ibestservices/ibest-ui-v2";
|
|
//@ComponentV2
|
|
|
|
@Entry
|
|
@ComponentV2
|
|
export struct LeftSideComponent {
|
|
@Local data: IBestTreeData[] = [
|
|
{
|
|
label: '模型视图',
|
|
children: [
|
|
{
|
|
label: 'Level two 1-1',
|
|
children: [
|
|
{
|
|
label: 'Level three 1-1-1',
|
|
children: [
|
|
{
|
|
label: 'Level four 1-1-1-1',
|
|
},
|
|
{
|
|
label: 'Level four 1-1-1-2',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
label: 'Level three 1-1-2',
|
|
children: [
|
|
{
|
|
label: 'Level four 1-1-2-1',
|
|
},
|
|
{
|
|
label: 'Level four 1-1-2-2',
|
|
},
|
|
],
|
|
},
|
|
],
|
|
},
|
|
{
|
|
label: 'Level two 1-2',
|
|
children: [
|
|
{
|
|
label: 'Level three 1-2-1',
|
|
},
|
|
{
|
|
label: 'Level three 1-2-2',
|
|
},
|
|
],
|
|
},
|
|
],
|
|
},
|
|
{
|
|
label: '摄像机',
|
|
children: [
|
|
{
|
|
label: 'Level two 1-1',
|
|
children: [
|
|
{
|
|
label: 'Level three 1-1-1',
|
|
children: [
|
|
{
|
|
label: 'Level four 1-1-1-1',
|
|
},
|
|
{
|
|
label: 'Level four 1-1-1-2',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
label: 'Level three 1-1-2',
|
|
children: [
|
|
{
|
|
label: 'Level four 1-1-2-1',
|
|
},
|
|
{
|
|
label: 'Level four 1-1-2-2',
|
|
},
|
|
],
|
|
},
|
|
],
|
|
},
|
|
{
|
|
label: 'Level two 1-2',
|
|
children: [
|
|
{
|
|
label: 'Level three 1-2-1',
|
|
},
|
|
{
|
|
label: 'Level three 1-2-2',
|
|
},
|
|
],
|
|
},
|
|
],
|
|
},
|
|
{
|
|
label: '图像',
|
|
children: [
|
|
{
|
|
label: 'Level two 1-1',
|
|
children: [
|
|
{
|
|
label: 'Level three 1-1-1',
|
|
children: [
|
|
{
|
|
label: 'Level four 1-1-1-1',
|
|
},
|
|
{
|
|
label: 'Level four 1-1-1-2',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
label: 'Level three 1-1-2',
|
|
children: [
|
|
{
|
|
label: 'Level four 1-1-2-1',
|
|
},
|
|
{
|
|
label: 'Level four 1-1-2-2',
|
|
},
|
|
],
|
|
},
|
|
],
|
|
},
|
|
{
|
|
label: 'Level two 1-2',
|
|
children: [
|
|
{
|
|
label: 'Level three 1-2-1',
|
|
},
|
|
{
|
|
label: 'Level three 1-2-2',
|
|
},
|
|
],
|
|
},
|
|
],
|
|
},
|
|
{
|
|
label: '模型历史记录',
|
|
children: [
|
|
{
|
|
label: 'Level two 1-1',
|
|
children: [
|
|
{
|
|
label: 'Level three 1-1-1',
|
|
children: [
|
|
{
|
|
label: 'Level four 1-1-1-1',
|
|
},
|
|
{
|
|
label: 'Level four 1-1-1-2',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
label: 'Level three 1-1-2',
|
|
children: [
|
|
{
|
|
label: 'Level four 1-1-2-1',
|
|
},
|
|
{
|
|
label: 'Level four 1-1-2-2',
|
|
},
|
|
],
|
|
},
|
|
],
|
|
},
|
|
{
|
|
label: 'Level two 1-2',
|
|
children: [
|
|
{
|
|
label: 'Level three 1-2-1',
|
|
},
|
|
{
|
|
label: 'Level three 1-2-2',
|
|
},
|
|
],
|
|
},
|
|
],
|
|
}
|
|
]
|
|
build() {
|
|
Column(){
|
|
Text('历史记录建模模式')
|
|
IBestTree({
|
|
data: this.data,
|
|
onNodeClick: (data: IBestTreeData, level: number) => {
|
|
console.log('onNodeClick', JSON.stringify(data), level)
|
|
}
|
|
})
|
|
}.height("100%")
|
|
.alignItems(HorizontalAlign.Start)
|
|
}
|
|
} |