vue、Steps 步骤条、Steps 属性、vue Steps 所有步骤条样式、vue Steps 步骤条全部属性

article/2025/9/17 22:13:48

vue、Steps 步骤条、Steps 属性、vue Steps 所有步骤条样式、vue Steps 步骤条全部属性

  • 设计规则
    • 何时使用
  • 代码演示
    • 1.基本用法
    • 2.迷你版
    • 3.带图标的步骤条
    • 4.步骤切换
    • 5.竖直方向的步骤条
    • 6.竖直方向的小型步骤条
    • 7.步骤运行错误
    • 8.点状步骤条
    • 9.自定义点状步骤条
  • API
    • Steps
    • Steps.Step

设计规则

引导用户按照流程完成任务的导航条。

何时使用

当任务复杂或者存在先后关系时,将其分解成一系列步骤,从而简化任务。

代码演示

1.基本用法

在这里插入图片描述
简单的步骤条。

<template><a-steps :current="1"><a-step><!-- <span slot="title">Finished</span> --><template slot="title">Finished</template><span slot="description">This is a description.</span></a-step><a-step title="In Progress" description="This is a description." /><a-step title="Waiting" description="This is a description." /></a-steps>
</template>

2.迷你版

在这里插入图片描述
迷你版的步骤条,通过设置 <Steps size="small"> 启用。

<template><a-steps :current="1" size="small"><a-step title="Finished" /><a-step title="In Progress" /><a-step title="Waiting" /></a-steps>
</template>

3.带图标的步骤条

在这里插入图片描述
通过设置 Steps.Stepicon 属性,可以启用自定义图标。

<template><a-steps><a-step status="finish" title="Login"><a-icon type="user" slot="icon" /></a-step><a-step status="finish" title="Verification"><a-icon type="solution" slot="icon" /></a-step><a-step status="process" title="Pay"><a-icon type="loading" slot="icon" /></a-step><a-step status="wait" title="Done"><a-icon type="smile-o" slot="icon" /></a-step></a-steps>
</template>

4.步骤切换

在这里插入图片描述
通常配合内容及按钮使用,表示一个流程的处理进度。

<template><div><a-steps :current="current"><a-step v-for="item in steps" :key="item.title" :title="item.title" /></a-steps><div class="steps-content">{{steps[current].content}}</div><div class="steps-action"><a-button v-if="current < steps.length - 1" type="primary" @click="next">Next</a-button><a-buttonv-if="current == steps.length - 1"type="primary"@click="$message.success('Processing complete!')">Done</a-button><a-button v-if="current>0" style="margin-left: 8px" @click="prev">Previous</a-button></div></div>
</template><script>export default {data() {return {current: 0,steps: [{title: 'First',content: 'First-content',},{title: 'Second',content: 'Second-content',},{title: 'Last',content: 'Last-content',},],};},methods: {next() {this.current++;},prev() {this.current--;},},};
</script><style scoped>.steps-content {margin-top: 16px;border: 1px dashed #e9e9e9;border-radius: 6px;background-color: #fafafa;min-height: 200px;text-align: center;padding-top: 80px;}.steps-action {margin-top: 24px;}
</style>

5.竖直方向的步骤条

在这里插入图片描述
简单的竖直方向的步骤条。

<template><a-steps direction="vertical" :current="1"><a-step title="Finished" description="This is a description." /><a-step title="In Progress" description="This is a description." /><a-step title="Waiting" description="This is a description." /></a-steps>
</template>

6.竖直方向的小型步骤条

在这里插入图片描述
简单的竖直方向的小型步骤条。

<template><a-steps direction="vertical" size="small" :current="1"><a-step title="Finished" description="This is a description." /><a-step title="In Progress" description="This is a description." /><a-step title="Waiting" description="This is a description." /></a-steps>
</template>

7.步骤运行错误

在这里插入图片描述
使用 Steps 的 status 属性来指定当前步骤的状态。

<template><a-steps :current="1" status="error"><a-step title="Finished" description="This is a description." /><a-step title="In Progress" description="This is a description." /><a-step title="Waiting" description="This is a description." /></a-steps>
</template>

8.点状步骤条

在这里插入图片描述
包含步骤点的进度条。

<template><a-steps progressDot :current="1"><a-step title="Finished" description="This is a description." /><a-step title="In Progress" description="This is a description." /><a-step title="Waiting" description="This is a description." /></a-steps>
</template>

9.自定义点状步骤条

在这里插入图片描述
为点状步骤条增加自定义展示。

<template><div><a-steps :current="1"><a-popover slot="progressDot" slot-scope="{index, status, prefixCls}"><template slot="content"><span>step {{index}} status: {{status}}</span></template><span :class="`${prefixCls}-icon-dot`"></span></a-popover><a-step title="Finished" description="You can hover on the dot." /><a-step title="In Progress" description="You can hover on the dot." /><a-step title="Waiting" description="You can hover on the dot." /><a-step title="Waiting" description="You can hover on the dot." /></a-steps></div>
</template>

API

Steps

整体步骤条。

参数说明类型默认值
current指定当前步骤,从 0 开始记数。在子 Step 元素中,可以通过 status 属性覆盖状态number0
direction指定步骤条方向。目前支持水平(horizontal)和竖直(vertical)两种方向stringhorizontal
labelPlacement指定标签放置位置,默认水平放图标右侧,可选vertical放图标下方stringhorizontal
progressDot点状步骤条,可以设置为一个 作用域插槽,labelPlacement 将强制为verticalBoolean or slot="progressDot" slot-scope="{index, status, title, description, prefixCls})"false
size指定大小,目前支持普通(default)和迷你(smallstringdefault
status指定当前步骤的状态,可选 wait process finish errorstringprocess
initial起始序号,从 0 开始记数number0

Steps.Step

步骤条内的每一个步骤。

参数说明类型默认值
description步骤的详情描述,可选`stringslot`
icon步骤图标的类型,可选`stringslot`
status指定状态。当不配置该属性时,会使用 Steps 的 current 来自动指定状态。可选: wait process finish errorstringwait
title标题`stringslot`

http://chatgpt.dhexx.cn/article/0eOAxwyA.shtml

相关文章

组件封装 - steps组件

首先, 我先来看看效果 steps 组件的封装和 tabs 组件还是相似的 都会去指定两个组件来完成(仿Element UI), 都会去使用 jsx 的语法 让其中一个组件去规定样式和排版, 另外一个组件去接收父组件传入的动态数据 但和面包屑组件还是有区别的(面包屑组件封装): 相同点都是使用两…

ElementUi Steps 步骤条的使用

效果&#xff1a; 实现&#xff1a; <el-steps :active"active" finish-status"success"><el-step title"步骤 1"></el-step><el-step title"步骤 2"></el-step><el-step title"步骤 3"&…

el-steps(步骤条)的入门学习

el-steps(步骤条)的入门学习 适用场景 在有步骤流程的情况下&#xff0c;可以设置步骤条&#xff0c;引导用户向下操作&#xff0c;如四六级的报考 知识点 el-steps嵌套el-step使用el-steps的active设置Number&#xff0c;从零开始el-steps的space设置Number&#xff0c;为…

Vue2步骤条(Steps)

Vue3步骤条&#xff08;Steps&#xff09; 可自定义设置以下属性&#xff1a; 步骤标题数组&#xff08;stepsLabel&#xff09;步骤描述数组&#xff08;stepsDesc&#xff09;步骤总数&#xff08;totalSteps&#xff09;&#xff0c;默认3当前选中的步骤&#xff08;curren…

Vue3步骤条(Steps)

Vue2步骤条&#xff08;Steps&#xff09; 可自定义设置以下属性&#xff1a; 步骤数组&#xff08;steps&#xff09;&#xff0c;类型&#xff1a;Array<{title?: string, description?: string}>&#xff0c;默认 [] 当前选中的步骤&#xff0c;设置 v-model 后&a…

CSS3动画——steps函数

CSS3动画中应用的定时函数&#xff08;timing function&#xff09;常用的有内置关键字linear, ease, ease-in, ease-out, ease-in-out, step-start, step-end&#xff0c;另外还有两个内置的缓动函数cubic-bezier(), steps() 其中steps()这个函数是将整个动画过程分为指定的步…

css3中animation的steps分步动画

css的animation中&#xff0c;有一种描述动画变化速率的东西&#xff0c;例如常见的linear,ease-in,ease-out等&#xff0c;这些都是连续的变化&#xff0c;还有一种叫做steps的&#xff0c;它用来描述一种不连续的动画&#xff0c;也就是逐帧动画。 基本认识 steps的格式为&…

超几何分布(Hypergeometric distribution)

超几何分布 百度解释 https://baike.baidu.com/item/超几何分布/4782968?fraladdin 通俗解释 超几何分布中的参数是M,N,n&#xff0c;超几何分布记作X~H(N,M,n) 。假如一共有100颗球&#xff0c;20颗为红球&#xff0c;80颗为白球&#xff0c;从中不放回地拿出10个球&#x…

机器学习小组知识点12:超几何分布(Hyper-Geometric Distribution)

超几何分布与二项分布的联系与区别 事实上,超几何分布和二项分布确实有着密切的联系&#xff0c;但也有明显的区别。   课本对于超几何分布的定义是这样的&#xff1a;一般的&#xff0c;若一个随机变量X的分布列为&#xff0c;其中&#xff0c;则称X服从超几何分布&#xf…

常见分布总结-高斯分布、伯努利分布、泊松分布、几何分布、beta分布

概率分布 概率分布是指用于表述随机变量取值的概率规律,包括连续分布和离散分布。 下面作了这些概率分布的一个思维导图。 文章目录 概率分布1、离散概率分布1.1、两点分布2.2、 二项分布1.3、几何分布1.4、超几何分布1.5、泊松分布2、连续概率分布2.1、均匀分布2.2、正太分布…

超几何分布的其他形式及其解释?

超几何分布定义 百度百科&#xff1a;超几何分布是统计学上一种离散概率分布。它描述了从有限N个物件&#xff08;其中包含M个指定种类的物件&#xff09;中抽出n个物件&#xff0c;成功抽出该指定种类的物件的次数&#xff08;不放回&#xff09;。称为超几何分布&#xff0c;…

geometric distribution and exponential distribution(几何分布和指数分布)

几何分布 分布函数均值和方差意义 表示经过k次实验才第一次得到正确的实验结果 比如抛硬币得到正面的需要抛的次数 指数分布 分布函数均值和方差意义 表示经过一段x之后&#xff0c;某件事第一次发生 比如经过x时间之后&#xff0c;公交车来的概率 比如餐厅从开业到第一个客人…

概率论的学习和整理9:超几何分布 (未完成!!!)

目录 1超几何分布 Hypergeometric distribution 1.1 超几何分布的定义 1.2 为什么叫超几何分布 1.3 超几何分布的公式 &#xff08;2种公式&#xff09; 1.3.1 超几何分布的公式1 &#xff08;总体型公式&#xff09; 1.3.2 超几何分布的公式2 &#xff08;拆…

概率论与数理统计基础(二):常用离散分布 二项、泊松、超几何分、几何、 负二项分布

本文列举了常见的离散分布&#xff0c;关于它们的背景、概率分布列、数学期望与方差&#xff0c;以及与之相关的一些重要性质&#xff1b;比如几何分布的无记忆性、 二项分布的泊松近似、超几何分布的二项近似。。。。可作为离散分布的知识速查表。 目录 1. 二项分布b(n,p) …

如何理解几何分布与指数分布的无记忆性?

在经济学上&#xff0c;有一个概念是沉没成本&#xff0c;大概指的是已经付出的、且不可收回的成本。针对这个概念有一个常见的说法&#xff1a; 这句话的意思是&#xff0c;既然沉没成本不可收回&#xff0c;那么在做选择的时候就不应该考虑它。举一个简单的例子&#xff0c;买…

几何分布的期望公式的推导

随机变量服从几何分布 概率分布 期望 现在先求等差比数列和 ②-③, 并运用等比数列求和公式,可得 将④代入①得

统计学:几何分布、二项分布、泊松分布

一、几何分布 假设某种赌博游戏的胜率为0.2&#xff0c;那么意味着你玩第一次就胜出的概率为0.2。 那玩第二次才胜出呢&#xff1f;“玩第二次才胜出”就意味着玩第一次是失败的&#xff0c;而直到第二次才胜出&#xff0c;那么这件事发生的概率就是0.80.20.16。 那么第三次…

统计学 分布篇 - Hypergeometric Distribution(超几何分布)

超几何分布: 是 离散随机分布的一种. 它描述的是 从 n 中 拿 k 个成功的事件的概率( 不放回, 不放回意味着该事件是非独立事件), 其中在 N 中一共有 K 个成功事件. n 为 样本数量, k 为样本中成功的概率 N为 事件的总数量(population), K为 在N中 事件的总数量. note: 超几…

几何分布的期望与方差

几何分布的期望与方差 高中数学教科书新版第三册&#xff08;选修II&#xff09;比原来的修订本新增加随机变量的几何分布&#xff0c;但书中只给出了结论&#xff1a;&#xff08;1&#xff09;&#xff0c;&#xff08;2&#xff09;&#xff0c;而未加以证明。本文给出证明&…