mirror of
				https://gitee.com/vant-contrib/vant.git
				synced 2025-10-27 01:32:10 +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); | ||||
| 
 | ||||
|           if (child.component?.subTree) { | ||||
|             result.push(child.component.subTree); | ||||
|             traverse(child.component.subTree.children); | ||||
|           } | ||||
| 
 | ||||
|  | ||||
| @ -15,7 +15,7 @@ exports[`should render Tab inside a component correctly 1`] = ` | ||||
|            aria-controls="van-tab" | ||||
|       > | ||||
|         <span class="van-tab__text van-tab__text--ellipsis"> | ||||
|           2 | ||||
|           1 | ||||
|         </span> | ||||
|       </div> | ||||
|       <div id="van-tabs-1" | ||||
| @ -26,7 +26,7 @@ exports[`should render Tab inside a component correctly 1`] = ` | ||||
|            aria-controls="van-tab" | ||||
|       > | ||||
|         <span class="van-tab__text van-tab__text--ellipsis"> | ||||
|           1 | ||||
|           2 | ||||
|         </span> | ||||
|       </div> | ||||
|       <div id="van-tabs-2" | ||||
| @ -47,15 +47,6 @@ exports[`should render Tab inside a component correctly 1`] = ` | ||||
|     </div> | ||||
|   </div> | ||||
|   <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" | ||||
|          role="tabpanel" | ||||
|          class="van-tab__panel" | ||||
| @ -64,6 +55,15 @@ exports[`should render Tab inside a component correctly 1`] = ` | ||||
|          style="display: none;" | ||||
|     > | ||||
|     </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" | ||||
|          role="tabpanel" | ||||
|          class="van-tab__panel" | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user