mirror of
				https://gitee.com/vant-contrib/vant.git
				synced 2025-10-31 03:22:08 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			28 lines
		
	
	
		
			633 B
		
	
	
	
		
			Vue
		
	
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
		
			633 B
		
	
	
	
		
			Vue
		
	
	
	
	
	
| <template>
 | |
|   <div :class="['van-loading', 'van-loading--' + type]">
 | |
|     <span :class="['van-loading__spinner', 'van-loading__spinner--' + type, 'van-loading__spinner--' + color]"></span>
 | |
|   </div>
 | |
| </template>
 | |
| 
 | |
| <script>
 | |
| const VALID_TYPES = ['gradient-circle', 'circle'];
 | |
| const VALID_COLORS = ['black', 'white'];
 | |
| 
 | |
| export default {
 | |
|   name: 'van-loading',
 | |
| 
 | |
|   props: {
 | |
|     type: {
 | |
|       type: String,
 | |
|       default: 'gradient-circle',
 | |
|       validator: value => VALID_TYPES.indexOf(value) > -1
 | |
|     },
 | |
|     color: {
 | |
|       type: String,
 | |
|       default: 'black',
 | |
|       validator: value => VALID_COLORS.indexOf(value) > -1
 | |
|     }
 | |
|   }
 | |
| };
 | |
| </script>
 |