mirror of
				https://gitee.com/vant-contrib/vant.git
				synced 2025-10-27 01:32:10 +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 ( | ||||
|           <Icon | ||||
|             class={bem('icon', 'finish')} | ||||
|             name={finishIcon} | ||||
|             color={activeColor} | ||||
|           /> | ||||
|           finishIconSlot || ( | ||||
|             <Icon | ||||
|               class={bem('icon', 'finish')} | ||||
|               name={finishIcon} | ||||
|               color={activeColor} | ||||
|             /> | ||||
|           ) | ||||
|         ); | ||||
|       } | ||||
| 
 | ||||
|  | ||||
| @ -79,10 +79,11 @@ export default { | ||||
| 
 | ||||
| ### Step Slots | ||||
| 
 | ||||
| | Name          | Description          | | ||||
| | ------------- | -------------------- | | ||||
| | active-icon   | Custom active icon   | | ||||
| | inactive-icon | Custom inactive icon | | ||||
| | Name                  | Description          | | ||||
| | --------------------- | -------------------- | | ||||
| | active-icon           | Custom active icon   | | ||||
| | inactive-icon         | Custom inactive icon | | ||||
| | finish-icon `v2.12.7` | Custom finish icon   | | ||||
| 
 | ||||
| ### Steps Events | ||||
| 
 | ||||
|  | ||||
| @ -89,10 +89,11 @@ export default { | ||||
| 
 | ||||
| ### Step Slots | ||||
| 
 | ||||
| | 名称          | 说明                 | | ||||
| | ------------- | -------------------- | | ||||
| | active-icon   | 自定义激活状态图标   | | ||||
| | 名称 | 说明 | | ||||
| | --- | --- | | ||||
| | active-icon | 自定义激活状态图标 | | ||||
| | inactive-icon | 自定义未激活状态图标 | | ||||
| | finish-icon `v2.12.7` | 自定义已完成步骤对应的底部图标,优先级高于 `inactive-icon` | | ||||
| 
 | ||||
| ### Steps Events | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user