mirror of
				https://gitee.com/vant-contrib/vant.git
				synced 2025-10-27 01:32:10 +08:00 
			
		
		
		
	fix(@vant/use): keep forward compatible (#9592)
This commit is contained in:
		
							parent
							
								
									95ffe9bc19
								
							
						
					
					
						commit
						8d9ccfd8c7
					
				| @ -1,5 +1,9 @@ | ||||
| export const inBrowser = typeof window !== 'undefined'; | ||||
| 
 | ||||
| // Keep forward compatible
 | ||||
| // should be removed in next major version
 | ||||
| export const supportsPassive = true; | ||||
| 
 | ||||
| export function raf(fn: FrameRequestCallback): number { | ||||
|   return inBrowser ? requestAnimationFrame(fn) : -1; | ||||
| } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user