mirror of
				https://gitee.com/vant-contrib/vant.git
				synced 2025-10-31 03:22:08 +08:00 
			
		
		
		
	feat(Step): add finish-icon slot (#8240)
This commit is contained in:
		
							parent
							
								
									2ae7c9b2ed
								
							
						
					
					
						commit
						4a68210c4f
					
				| @ -55,13 +55,16 @@ export default createComponent({ | |||||||
|         ); |         ); | ||||||
|       } |       } | ||||||
| 
 | 
 | ||||||
|       if (this.status === 'finish' && finishIcon) { |       const finishIconSlot = this.slots('finish-icon'); | ||||||
|  |       if (this.status === 'finish' && (finishIcon || finishIconSlot)) { | ||||||
|         return ( |         return ( | ||||||
|  |           finishIconSlot || ( | ||||||
|             <Icon |             <Icon | ||||||
|               class={bem('icon', 'finish')} |               class={bem('icon', 'finish')} | ||||||
|               name={finishIcon} |               name={finishIcon} | ||||||
|               color={activeColor} |               color={activeColor} | ||||||
|             /> |             /> | ||||||
|  |           ) | ||||||
|         ); |         ); | ||||||
|       } |       } | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -80,9 +80,10 @@ export default { | |||||||
| ### Step Slots | ### Step Slots | ||||||
| 
 | 
 | ||||||
| | Name                  | Description          | | | Name                  | Description          | | ||||||
| | ------------- | -------------------- | | | --------------------- | -------------------- | | ||||||
| | active-icon           | Custom active icon   | | | active-icon           | Custom active icon   | | ||||||
| | inactive-icon         | Custom inactive icon | | | inactive-icon         | Custom inactive icon | | ||||||
|  | | finish-icon `v2.12.7` | Custom finish icon   | | ||||||
| 
 | 
 | ||||||
| ### Steps Events | ### Steps Events | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -90,9 +90,10 @@ export default { | |||||||
| ### Step Slots | ### Step Slots | ||||||
| 
 | 
 | ||||||
| | 名称 | 说明 | | | 名称 | 说明 | | ||||||
| | ------------- | -------------------- | | | --- | --- | | ||||||
| | active-icon | 自定义激活状态图标 | | | active-icon | 自定义激活状态图标 | | ||||||
| | inactive-icon | 自定义未激活状态图标 | | | inactive-icon | 自定义未激活状态图标 | | ||||||
|  | | finish-icon `v2.12.7` | 自定义已完成步骤对应的底部图标,优先级高于 `inactive-icon` | | ||||||
| 
 | 
 | ||||||
| ### Steps Events | ### Steps Events | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user