mirror of
				https://gitee.com/vant-contrib/vant.git
				synced 2025-10-31 19:42:07 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			36 lines
		
	
	
		
			544 B
		
	
	
	
		
			Markdown
		
	
	
	
	
	
			
		
		
	
	
			36 lines
		
	
	
		
			544 B
		
	
	
	
		
			Markdown
		
	
	
	
	
	
| # @vant/compat
 | |
| 
 | |
| This package provides Vant 3 compatible behavior for Vant 4 users.
 | |
| 
 | |
| ## Install
 | |
| 
 | |
| ```shell
 | |
| # with npm
 | |
| npm i @vant/compat
 | |
| 
 | |
| # with yarn
 | |
| yarn add @vant/compat
 | |
| 
 | |
| # with pnpm
 | |
| pnpm add @vant/compat
 | |
| 
 | |
| # with Bun
 | |
| bun add @vant/compat
 | |
| ```
 | |
| 
 | |
| ## Usage
 | |
| 
 | |
| ```js
 | |
| // Same as Toast in Vant 3
 | |
| import { Toast } from '@vant/compat';
 | |
| 
 | |
| // Same as Dialog in Vant 3
 | |
| import { Dialog } from '@vant/compat';
 | |
| 
 | |
| // Same as Notify in Vant 3
 | |
| import { Notify } from '@vant/compat';
 | |
| 
 | |
| // Same as ImagePreview in Vant 3
 | |
| import { ImagePreview } from '@vant/compat';
 | |
| ```
 |