zjk
2026-09-29 54dcf0a82e7490fa58b1c056d5c0b9cb739c2931
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import type { ExtractPropTypes, PropType } from 'vue';
import { baseProps } from '../common/props';
import type { StepMode, ThemeType } from '../../types/global';
import { getColor } from '../../';
 
/**
 * StepProps 步骤条 props 类型定义
 * @description 步骤条,支持横向/竖向、主题色、激活色等
 */
 
export const StepProps = {
    ...baseProps,
    /** 步骤条的类型,dot|number */
    mode: { type: String as PropType<StepMode>, default: 'dot' },
    /** 主题类型, primary|success|info|warning|error */
    type: { type: String as PropType<ThemeType>, default: 'primary' },
    /** 激活步骤的颜色 */
    activeColor: { type: String, default: () => getColor('primary') },
    /** 未激活的颜色 */
    unActiveColor: { type: String, default: () => getColor('info') },
    /** 自定义图标 */
    icon: { type: String, default: 'checkmark' },
    /** 标题 */
    name: { type: String, default: '' },
    /** 描述 */
    desc: { type: String, default: '' }
};
 
export type StepProps = ExtractPropTypes<typeof StepProps>;