We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
theme !== default
1 parent eb97c19 commit a94969dCopy full SHA for a94969d
packages/components/steps/StepItem.tsx
@@ -26,20 +26,17 @@ const StepItem: React.FC<StepItemProps> = (originalProps) => {
26
27
// 步骤条每一步展示的图标
28
const iconNode = React.useMemo<React.ReactNode>(() => {
29
- if (!icon) {
+ if (!icon || theme !== 'default') {
30
return null;
31
}
32
33
- if (theme === 'default' && icon !== true) {
+ // 自定义图标直接返回
34
+ if (icon !== true) {
35
return icon;
36
37
38
const iconCls = `${classPrefix}-steps-item__icon--number`;
39
- if (icon !== true) {
40
- return <span className={iconCls}>{icon}</span>;
41
- }
42
-
43
// 根据状态返回对应的默认图标
44
const getDefaultIconByStatus = () => {
45
switch (status) {
0 commit comments