feat: alias $attrs to $props when component has no declared props
This commit is contained in:
		
							parent
							
								
									c94ce3ed62
								
							
						
					
					
						commit
						3a7bbecb22
					
				@ -84,6 +84,9 @@ export function resolveProps(
 | 
				
			|||||||
        validateProp(key, unwrap(rawData[key]), opt, isAbsent)
 | 
					        validateProp(key, unwrap(rawData[key]), opt, isAbsent)
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					  } else {
 | 
				
			||||||
 | 
					    // if component has no declared props, $attrs === $props
 | 
				
			||||||
 | 
					    attrs = props
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  return { props, attrs }
 | 
					  return { props, attrs }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user