feat(Steps): add finish-icon prop (#8103)

This commit is contained in:
neverland
2021-02-08 11:19:31 +08:00
committed by GitHub
parent 914b742fc9
commit 1a28027e1c
7 changed files with 66 additions and 33 deletions
+11 -1
View File
@@ -45,7 +45,7 @@ export default createComponent({
};
const renderCircle = () => {
const { activeIcon, activeColor, inactiveIcon } = parentProps;
const { finishIcon, activeIcon, activeColor, inactiveIcon } = parentProps;
if (isActive()) {
if (slots['active-icon']) {
@@ -61,6 +61,16 @@ export default createComponent({
);
}
if (getStatus() === 'finish' && finishIcon) {
return (
<Icon
class={bem('icon', 'finish')}
name={finishIcon}
color={activeColor}
/>
);
}
if (slots['inactive-icon']) {
return slots['inactive-icon']();
}
+2 -1
View File
@@ -144,7 +144,8 @@
&__title {
transition: color @animation-duration-base;
&--active {
&--active,
&--finish {
color: @step-active-color;
}
}