mirror of
				https://gitee.com/vant-contrib/vant.git
				synced 2025-10-27 01:32:10 +08:00 
			
		
		
		
	types: fix to prop typing (#8134)
This commit is contained in:
		
							parent
							
								
									1019463e89
								
							
						
					
					
						commit
						7a5fb894d2
					
				| @ -7,10 +7,10 @@ import { | |||||||
|   getCurrentInstance, |   getCurrentInstance, | ||||||
|   ComponentPublicInstance, |   ComponentPublicInstance, | ||||||
| } from 'vue'; | } from 'vue'; | ||||||
| import type { RouteLocation } from 'vue-router'; | import type { RouteLocationRaw } from 'vue-router'; | ||||||
| 
 | 
 | ||||||
| export const routeProps = { | export const routeProps = { | ||||||
|   to: [String, Object] as PropType<RouteLocation>, |   to: [String, Object] as PropType<RouteLocationRaw>, | ||||||
|   url: String, |   url: String, | ||||||
|   replace: Boolean, |   replace: Boolean, | ||||||
| }; | }; | ||||||
|  | |||||||
							
								
								
									
										1
									
								
								src/vue-tsx-shim.d.ts
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								src/vue-tsx-shim.d.ts
									
									
									
									
										vendored
									
									
								
							| @ -14,5 +14,6 @@ declare module 'vue' { | |||||||
|     onClosed?: EventHandler; |     onClosed?: EventHandler; | ||||||
|     onChange?: EventHandler; |     onChange?: EventHandler; | ||||||
|     onToggle?: EventHandler; |     onToggle?: EventHandler; | ||||||
|  |     onClickStep?: EventHandler; | ||||||
|   } |   } | ||||||
| } | } | ||||||
|  | |||||||
| @ -37,10 +37,10 @@ export function mockScrollIntoView() { | |||||||
|   return fn; |   return fn; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| export function mockGetBoundingClientRect(rect: DOMRect): () => void { | export function mockGetBoundingClientRect(rect: Partial<DOMRect>): () => void { | ||||||
|   const originMethod = Element.prototype.getBoundingClientRect; |   const originMethod = Element.prototype.getBoundingClientRect; | ||||||
| 
 | 
 | ||||||
|   Element.prototype.getBoundingClientRect = jest.fn(() => rect); |   Element.prototype.getBoundingClientRect = jest.fn(() => rect as DOMRect); | ||||||
| 
 | 
 | ||||||
|   return function () { |   return function () { | ||||||
|     Element.prototype.getBoundingClientRect = originMethod; |     Element.prototype.getBoundingClientRect = originMethod; | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user