mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
fix(@vant/use): missing subTree when flattening vnodes (#10235)
This commit is contained in:
parent
b338aef41f
commit
760fcbb424
@ -20,6 +20,7 @@ export function flattenVNodes(children: VNodeNormalizedChildren) {
|
|||||||
result.push(child);
|
result.push(child);
|
||||||
|
|
||||||
if (child.component?.subTree) {
|
if (child.component?.subTree) {
|
||||||
|
result.push(child.component.subTree);
|
||||||
traverse(child.component.subTree.children);
|
traverse(child.component.subTree.children);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ exports[`should render Tab inside a component correctly 1`] = `
|
|||||||
aria-controls="van-tab"
|
aria-controls="van-tab"
|
||||||
>
|
>
|
||||||
<span class="van-tab__text van-tab__text--ellipsis">
|
<span class="van-tab__text van-tab__text--ellipsis">
|
||||||
2
|
1
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div id="van-tabs-1"
|
<div id="van-tabs-1"
|
||||||
@ -26,7 +26,7 @@ exports[`should render Tab inside a component correctly 1`] = `
|
|||||||
aria-controls="van-tab"
|
aria-controls="van-tab"
|
||||||
>
|
>
|
||||||
<span class="van-tab__text van-tab__text--ellipsis">
|
<span class="van-tab__text van-tab__text--ellipsis">
|
||||||
1
|
2
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div id="van-tabs-2"
|
<div id="van-tabs-2"
|
||||||
@ -47,15 +47,6 @@ exports[`should render Tab inside a component correctly 1`] = `
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="van-tabs__content">
|
<div class="van-tabs__content">
|
||||||
<div id="van-tab"
|
|
||||||
role="tabpanel"
|
|
||||||
class="van-tab__panel"
|
|
||||||
tabindex="0"
|
|
||||||
aria-labelledby="van-tabs-1"
|
|
||||||
style
|
|
||||||
>
|
|
||||||
1
|
|
||||||
</div>
|
|
||||||
<div id="van-tab"
|
<div id="van-tab"
|
||||||
role="tabpanel"
|
role="tabpanel"
|
||||||
class="van-tab__panel"
|
class="van-tab__panel"
|
||||||
@ -64,6 +55,15 @@ exports[`should render Tab inside a component correctly 1`] = `
|
|||||||
style="display: none;"
|
style="display: none;"
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
|
<div id="van-tab"
|
||||||
|
role="tabpanel"
|
||||||
|
class="van-tab__panel"
|
||||||
|
tabindex="0"
|
||||||
|
aria-labelledby="van-tabs-1"
|
||||||
|
style
|
||||||
|
>
|
||||||
|
2
|
||||||
|
</div>
|
||||||
<div id="van-tab"
|
<div id="van-tab"
|
||||||
role="tabpanel"
|
role="tabpanel"
|
||||||
class="van-tab__panel"
|
class="van-tab__panel"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user