import type { ExtractPropTypes, PropType } from 'vue'; import type { StepDirection, StepMode, StepsListItem, ThemeType } from '../../types/global'; import { getColor } from '../../'; /** * StepsProps 步骤条 props 类型定义 * @description 步骤条,支持横向/竖向、主题色、激活色等 */ export const StepsProps = { /** 自定义根节点样式 */ customStyle: { type: [String, Object] as PropType>, default: () => ({}) }, /** 自定义根节点样式类 */ customClass: { type: String as unknown as PropType, default: '' }, /** 步骤条的类型,dot|number */ mode: { type: String as PropType, default: 'dot' }, /** 步骤条的数据 */ list: { type: Array as PropType, default: () => [] }, /** 主题类型, primary|success|info|warning|error */ type: { type: String as PropType, default: 'primary' }, /** 当前哪一步是激活的 */ current: { type: [Number, String] as PropType, default: 0 }, /** 激活步骤的颜色 */ activeColor: { type: String, default: () => getColor('primary') }, /** 未激活的颜色 */ unActiveColor: { type: String, default: () => getColor('info') }, /** 自定义图标 */ icon: { type: String, default: 'checkmark' }, /** step的排列方向,row-横向,column-竖向 */ direction: { type: String as PropType, default: 'row' } }; export type StepsProps = ExtractPropTypes;