feat(web): show child count in object tree nodes

This commit is contained in:
2026-08-14 12:05:46 +08:00
parent 0d35ad56f2
commit 699b89e916
+10
View File
@@ -150,6 +150,16 @@ function TreeNode({
))} ))}
</span> </span>
<span className="truncate">{node.label}</span> <span className="truncate">{node.label}</span>
{hasChildren && (
<span
title={`${node.children.length} ${
node.children.length === 1 ? 'child' : 'children'
}`}
className="ml-1.5 shrink-0 rounded bg-zinc-800 px-1 font-mono text-[10px] leading-4 text-zinc-500"
>
{node.children.length}
</span>
)}
</button> </button>
</div> </div>
{hasChildren && expanded && ( {hasChildren && expanded && (