const records = [
{
group: "Human Resources Department",
total_children: 30,
monthly_expense: "$45000",
new_hires_this_month: 6,
resignations_this_month: 3,
complaints_and_suggestions: 2,
g_test: "G1",
children: [
{
group: "Recruiting Group",
children: [
{
group: "John Smith",
position: "Recruiting Manager",
salary: "$8000"
},
{
group: "Emily Johnson",
position: "Recruiting Supervisor",
salary: "$6000"
},
{
group: "Michael Davis",
position: "Recruiting Specialist",
salary: "$4000"
}
],
total_children: 15,
monthly_expense: "$25000",
new_hires_this_month: 4,
resignations_this_month: 2,
complaints_and_suggestions: 1
},
{
group: "Training Group",
children: [
{
group: "Jessica Brown",
position: "Training Manager",
salary: "$8000"
},
{
group: "Andrew Wilson",
position: "Training Supervisor",
salary: "$6000"
}
],
total_children: 15,
monthly_expense: "$20000",
new_hires_this_month: 2,
resignations_this_month: 1,
complaints_and_suggestions: 1
}
]
},
{
group: "Human Resources Department",
total_children: 30,
monthly_expense: "$45000",
new_hires_this_month: 6,
resignations_this_month: 3,
complaints_and_suggestions: 2,
g_test: "G2",
children: [
{
group: "Recruiting Group",
children: [
{
group: "John Smith",
position: "Recruiting Manager",
salary: "$8000"
},
{
group: "Emily Johnson",
position: "Recruiting Supervisor",
salary: "$6000"
},
{
group: "Michael Davis",
position: "Recruiting Specialist",
salary: "$4000"
}
],
total_children: 15,
monthly_expense: "$25000",
new_hires_this_month: 4,
resignations_this_month: 2,
complaints_and_suggestions: 1
},
{
group: "Training Group",
children: [
{
group: "Jessica Brown",
position: "Training Manager",
salary: "$8000"
},
{
group: "Andrew Wilson",
position: "Training Supervisor",
salary: "$6000"
}
],
total_children: 15,
monthly_expense: "$20000",
new_hires_this_month: 2,
resignations_this_month: 1,
complaints_and_suggestions: 1
}
]
}
];
const columns = [
{
field: "group",
title: "department",
width: "auto",
tree: true
},
{
field: "total_children",
title: "memebers count",
width: 150,
fieldFormat(rec) {
if (rec?.["position"]) {
return `position: ${rec["position"]}`;
} else return rec?.["total_children"];
}
},
{
field: "monthly_expense",
title: "monthly expense",
width: "auto",
fieldFormat(rec) {
if (rec?.["salary"]) {
return `salary: ${rec["salary"]}`;
} else return rec?.["monthly_expense"];
}
},
{
field: "new_hires_this_month",
title: "new hires this month",
width: "auto"
},
{
field: "resignations_this_month",
title: "resignations this month",
width: "auto"
},
{
field: "complaints_and_suggestions",
title: "recived complaints counts",
width: "auto"
}
];
const option = {
records,
columns,
hierarchyExpandLevel:100,
widthMode: "standard",
heightMode: "autoHeight",
autoWrapText: true,
canvasWidth: 500,
canvasHeight: 200,
theme: { bodyStyle: { bgColor: "transparent" } }
};
const tableInstance = new VTable.ListTable(document.getElementById(CONTAINER_ID), option);
window["tableInstance"] = tableInstance;
- OS:
- Browser:
- Framework:
Version
1.16.2
Link to Minimal Reproduction
https://visactor.com/vtable/guide/table_type/List_table/tree_list?version=1.16.2
Steps to Reproduce
Current Behavior
行的位置错乱重叠:

Expected Behavior
正常渲染
Environment
Any additional comments?
No response