Steps (步骤条)

多步流程(items + current):横向/纵向、完成/进行/待办状态,数据驱动且 SSR 安全。

基础用法

  1. 已完成:填写信息

    账号与昵称

  2. 当前步骤:验证邮箱

    点击邮件链接

  3. 未开始:完成

    开始使用

Basic.vue

点击跳转

用 v-model:current 绑定后,步骤变成按钮:默认 linear 只允许点回已走过的步骤,前进仍交给你自己的「下一步」和它的校验;只写 :current 时保持纯展示。

  1. 已完成:填写信息

    账号与昵称

  2. 已完成:验证邮箱

    点击邮件链接

  3. 当前步骤:设置头像

    可以稍后再改

  4. 未开始:完成

    开始使用

Clickable.vue

非线性

:linear="false" 让每一步都能直接点到,适合没有先后依赖的引导流程;单个步骤可用 disabled 排除。

  1. 当前步骤:下载本体

    游戏本体

  2. 未开始:下载补丁

    翻译 / 破解

  3. 未开始:打补丁

    图文教程

从下方镜像任选其一下载游戏本体,解压到不含中文的路径。

NonLinear.vue

错误状态

条目的 status: 'error' 把该步标成失败,与它相对 current 的位置无关。

  1. 已完成:达成条件

  2. 已完成:提交申请

  3. 出错:管理员审核

  4. 未开始:成为创作者

申请未通过

已合并的词条更新请求不足 3 条,补足后可以重新提交。

Error.vue

纵向

  1. 已完成:已提交

    资源已进入审核队列

  2. 当前步骤:审核中

    管理员正在审核

  3. 未开始:已发布

Vertical.vue

颜色与尺寸

  1. 已完成:步骤一

  2. 当前步骤:步骤二

  3. 未开始:步骤三

  1. 已完成:步骤一

  2. 当前步骤:步骤二

  3. 未开始:步骤三

Colors.vue

属性

属性类型默认值说明
items *KunStepItem[]—The steps, in order.
classNamestring""
colorKunUIColor"primary"Colour of the done and current steps.
currentnumber00-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.
linearbooleantrueWith `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.
sizeKunStepsSize"md"Indicator and title size.

事件

事件回调参数说明
update:currentindex: numberA step was clicked; carries its 0-based index. Never fires for the current step, a `disabled` one, or — while `linear` — one after `current`.