diff --git a/packages/vant-use/src/useRelation/useChildren.ts b/packages/vant-use/src/useRelation/useChildren.ts index 3ef15d4a9..7e78075bb 100644 --- a/packages/vant-use/src/useRelation/useChildren.ts +++ b/packages/vant-use/src/useRelation/useChildren.ts @@ -20,6 +20,7 @@ export function flattenVNodes(children: VNodeNormalizedChildren) { result.push(child); if (child.component?.subTree) { + result.push(child.component.subTree); traverse(child.component.subTree.children); } diff --git a/packages/vant/src/tab/test/__snapshots__/insert.spec.tsx.snap b/packages/vant/src/tab/test/__snapshots__/insert.spec.tsx.snap index 2786e8e55..d44b3e5f1 100644 --- a/packages/vant/src/tab/test/__snapshots__/insert.spec.tsx.snap +++ b/packages/vant/src/tab/test/__snapshots__/insert.spec.tsx.snap @@ -15,7 +15,7 @@ exports[`should render Tab inside a component correctly 1`] = ` aria-controls="van-tab" > - 2 + 1