mirror of
				https://github.com/568071718/creator-collection-view
				synced 2025-11-03 21:05:28 +00:00 
			
		
		
		
	获取widget组件容错处理
This commit is contained in:
		@@ -574,7 +574,7 @@ export class YXCollectionView extends Component {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
            let transform = content.getComponent(UITransform) || content.addComponent(UITransform)
 | 
					            let transform = content.getComponent(UITransform) || content.addComponent(UITransform)
 | 
				
			||||||
            transform.contentSize = this.node.getComponent(UITransform).contentSize
 | 
					            transform.contentSize = this.node.getComponent(UITransform).contentSize
 | 
				
			||||||
            this.getComponent(Widget).updateAlignment?.();
 | 
					            this.getComponent(Widget)?.updateAlignment?.();
 | 
				
			||||||
            result.content = content
 | 
					            result.content = content
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user