feat(Steps): add finish-icon prop (#8103)
This commit is contained in:
+11
-1
@@ -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
@@ -144,7 +144,8 @@
|
||||
&__title {
|
||||
transition: color @animation-duration-base;
|
||||
|
||||
&--active {
|
||||
&--active,
|
||||
&--finish {
|
||||
color: @step-active-color;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user