
Product
PHP and Composer Support Is Now in Beta
Socket’s PHP and Composer support is now in Beta for all customers, with PHP reachability analysis generally available.
@daflow-ui/ui-steps
Advanced tools
Steps 步骤条组件,用于引导用户按照流程完成任务。
pnpm add @daflow-ui/ui-steps
全局引入样式(在 main.ts 中):
import '@daflow-ui/ui-steps/style.css'
基础用法:
<script setup lang="ts">
import { ref } from 'vue'
import { DfSteps, DfStep } from '@daflow-ui/ui-steps'
const current = ref(0)
const handleNext = () => {
if (current.value < 2) current.value++
}
const handlePrev = () => {
if (current.value > 0) current.value--
}
</script>
<template>
<DfSteps :current="current">
<DfStep title="步骤 1" description="填写信息" />
<DfStep title="步骤 2" description="确认信息" />
<DfStep title="步骤 3" description="完成" />
</DfSteps>
<button @click="handlePrev">上一步</button>
<button @click="handleNext">下一步</button>
</template>
带内容区域(内容由业务自行渲染):
<DfSteps :current="current">
<DfStep title="填写信息" description="填写基本信息" />
<DfStep title="确认信息" description="核对并确认" />
<DfStep title="完成" description="提交成功" />
</DfSteps>
<div v-if="current === 0">
<form><!-- 表单内容 --></form>
<button @click="current++">下一步</button>
</div>
<div v-else-if="current === 1">
<p>请确认信息...</p>
<button @click="current--">上一步</button>
<button @click="current++">提交</button>
</div>
<div v-else>
<p>✅ 提交成功!</p>
</div>
说明:DfStep 仅负责渲染步骤条,不提供默认插槽;内容区域请在 DfSteps 外部自行渲染并用 current 控制显示。
v-for 渲染步骤:
<script setup lang="ts">
import { ref } from 'vue'
const current = ref(0)
const steps = [
{ key: 'draft', title: '草稿', description: '填写基本信息' },
{ key: 'review', title: '审核', description: '确认内容与信息' },
{ key: 'publish', title: '发布', description: '完成发布流程' }
]
</script>
<template>
<DfSteps :current="current">
<DfStep
v-for="step in steps"
:key="step.key"
:title="step.title"
:description="step.description"
/>
</DfSteps>
</template>
| 属性 | 说明 | 类型 | 默认值 |
|---|---|---|---|
current | 当前激活步骤的索引(从 0 开始) | number | 0 |
direction | 步骤条方向 | 'horizontal' | 'vertical' | 'horizontal' |
titlePlacement | 标题和指示器的布局关系 | 'horizontal' | 'vertical' | 'horizontal' |
| 属性 | 说明 | 类型 | 默认值 |
|---|---|---|---|
title | 步骤标题 | string | '' |
description | 步骤描述 | string | '' |
| 插槽名 | 说明 | 作用域参数 |
|---|---|---|
icon | 自定义图标 | { index: number, status: string } |
title | 自定义标题 | { title: string, index: number } |
description | 自定义描述 | { description: string, index: number } |
pnpm install
cd ../.. # 回到 monorepo 根目录
pnpm dev # 启动统一 playground,自动发现组件
组件会自动出现在 playground 导航中(通过 dev/index.vue)。
pnpm build
pnpm typecheck
pnpm lint
pnpm lint:fix
MIT
FAQs
Steps component for DaFlow UI
We found that @daflow-ui/ui-steps demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.

Product
Socket’s PHP and Composer support is now in Beta for all customers, with PHP reachability analysis generally available.

Product
Socket is bringing experimental protection to Firefox, scanning 97,000+ extensions in Mozilla's official directory for malware and risky updates.

Research
/Security News
Three compromised Rust crates pulled in a malicious dependency that downloaded and executed cross-platform malware during Cargo builds.