🐛(component): [tab] 修复 tab 更新
ISSUES CLOSED: #I5P4I3
This commit is contained in:
		
							parent
							
								
									fa37943b18
								
							
						
					
					
						commit
						919b1406e3
					
				@ -43,7 +43,6 @@ export interface LayTabProps {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const slot = useSlots();
 | 
			
		||||
const slots = slot.default && slot.default();
 | 
			
		||||
const childrens: Ref<VNode[]> = ref([]);
 | 
			
		||||
const slotsChange = ref(true);
 | 
			
		||||
const tabMap = reactive(new Map<number, TabData>());
 | 
			
		||||
@ -283,7 +282,7 @@ const renderTabChild = (child: TabData) => {
 | 
			
		||||
useResizeObserver(navRef, update);
 | 
			
		||||
 | 
			
		||||
watch(
 | 
			
		||||
  slotsChange,
 | 
			
		||||
  tabMap,
 | 
			
		||||
  function () {
 | 
			
		||||
    childrens.value = [];
 | 
			
		||||
    setItemInstanceBySlot((slot.default && slot.default()) as VNode[]);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user