From 4a68210c4f9e409521dc4d42ca6b4aba081567ca Mon Sep 17 00:00:00 2001 From: neverland Date: Sun, 28 Feb 2021 19:34:13 +0800 Subject: [PATCH] feat(Step): add finish-icon slot (#8240) --- src/step/index.js | 15 +++++++++------ src/steps/README.md | 9 +++++---- src/steps/README.zh-CN.md | 7 ++++--- 3 files changed, 18 insertions(+), 13 deletions(-) diff --git a/src/step/index.js b/src/step/index.js index d963e0aec..ebb88b14f 100644 --- a/src/step/index.js +++ b/src/step/index.js @@ -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 ( - + finishIconSlot || ( + + ) ); } diff --git a/src/steps/README.md b/src/steps/README.md index 95342e544..d1e614d11 100644 --- a/src/steps/README.md +++ b/src/steps/README.md @@ -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 diff --git a/src/steps/README.zh-CN.md b/src/steps/README.zh-CN.md index 0453ba4ab..50b620771 100644 --- a/src/steps/README.zh-CN.md +++ b/src/steps/README.zh-CN.md @@ -89,10 +89,11 @@ export default { ### Step Slots -| 名称 | 说明 | -| ------------- | -------------------- | -| active-icon | 自定义激活状态图标 | +| 名称 | 说明 | +| --- | --- | +| active-icon | 自定义激活状态图标 | | inactive-icon | 自定义未激活状态图标 | +| finish-icon `v2.12.7` | 自定义已完成步骤对应的底部图标,优先级高于 `inactive-icon` | ### Steps Events