Steps (步骤条)
多步流程(items + current):横向/纵向、完成/进行/待办状态,数据驱动且 SSR 安全。
基础用法
账号与昵称
点击邮件链接
开始使用
Basic.vue
点击跳转
用 v-model:current 绑定后,步骤变成按钮:默认 linear 只允许点回已走过的步骤,前进仍交给你自己的「下一步」和它的校验;只写 :current 时保持纯展示。
账号与昵称
点击邮件链接
可以稍后再改
开始使用
Clickable.vue
非线性
:linear="false" 让每一步都能直接点到,适合没有先后依赖的引导流程;单个步骤可用 disabled 排除。
游戏本体
翻译 / 破解
图文教程
从下方镜像任选其一下载游戏本体,解压到不含中文的路径。
NonLinear.vue
错误状态
条目的 status: 'error' 把该步标成失败,与它相对 current 的位置无关。
申请未通过
已合并的词条更新请求不足 3 条,补足后可以重新提交。
Error.vue
纵向
资源已进入审核队列
管理员正在审核
Vertical.vue
颜色与尺寸
Colors.vue
属性
| 属性 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| items * | KunStepItem[] | — | The steps, in order. |
| className | string | "" | |
| color | KunUIColor | "primary" | Colour of the done and current steps. |
| current | number | 0 | 0-based index of the current step; earlier steps render as done. Bind it with `v-model:current` to make the steps clickable — with a plain `:current` they are display-only. |
| linear | boolean | true | With `v-model:current` bound: `true` lets a click go back to any earlier step but never forward, so forward moves stay behind your own "next" button and its validation; `false` makes every step reachable. |
| orientation | "horizontal" | "vertical" | "horizontal" | Horizontal lays titles under the indicators; vertical stacks the steps with titles beside them. |
| size | KunStepsSize | "md" | Indicator and title size. |
事件
| 事件 | 回调参数 | 说明 |
|---|---|---|
| update:current | index: number | A step was clicked; carries its 0-based index. Never fires for the current step, a `disabled` one, or — while `linear` — one after `current`. |