Appearance
Steps 步骤条
引导用户按照流程完成任务的导航条,支持水平、垂直、点状和导航四种样式。
基础用法
填写信息
填写基本用户信息
验证身份
手机号或邮箱验证
完成注册
注册成功
步骤类型
步骤一
步骤二
步骤三
步骤四
垂直方向
已完成
进行中
出错了
等待中
API
Props
| 属性 | 类型 | 默认值 | 说明 |
|---|---|---|---|
current | number | 0 | 当前步骤索引 |
items | StepItem[] | — | 步骤数据(必填) |
direction | StepsDirection | 'horizontal' | 方向:horizontal | vertical |
type | StepsType | 'default' | 样式:default | dot | navigation |
size | StepsSize | 'md' | 尺寸:sm | md |
status | StepStatus | 'process' | 当前步骤的状态 |
onChange | (index) => void | — | 点击步骤回调 |
className | string | — | 自定义 class |
style | object | — | 自定义样式 |
StepItem
| 字段 | 类型 | 说明 |
|---|---|---|
title | string | 步骤标题(必填) |
description | string | 步骤描述 |
status | StepStatus | 单独覆盖此步骤状态 |
disabled | boolean | 禁用点击 |
类型
ts
type StepStatus = "wait" | "process" | "finish" | "error";
type StepsDirection = "horizontal" | "vertical";
type StepsType = "default" | "dot" | "navigation";
type StepsSize = "sm" | "md";