uView Steps 步骤条

该组件一般用于完成一个任务要分几个步骤,标识目前处于第几步的场景。

#平台差异说明

App(vue) App(nvue) H5 小程序

#基本使用

说明

由于安卓nvue下,overflow属性不支持visible值,故此组件暂不支持安卓nvue环境。

  • 通过current参数标识目前处于第几步,从0开始
<template>
	<u-steps current="0">
		<u-steps-item title="已下单" desc="10:30">
		</u-steps-item>
		<u-steps-item title="已出库" desc="10:35" ></u-steps-item>
		<u-steps-item title="运输中" desc="11:40"></u-steps-item>
	</u-steps>
</template>

copy

#错误状态

如果设置u-steps-itemerror参数为true的话,当前步骤将会为“失败”的状态

<u-steps current="1">
	<u-steps-item title="已下单" desc="10:30"></u-steps-item>
	<u-steps-item error title="仓库着火" desc="10:35"></u-steps-item>
	<u-steps-item title="破产清算" desc="11:40"></u-steps-item>
</u-steps>

copy

#步骤条模式

u-stepsdot参数设置为true的话,将会以点状的形式展示步骤条样式。

<u-steps current="1" dot>
	<u-steps-item title="已下单" desc="10:30"></u-steps-item>
	<u-steps-item title="已出库" desc="10:35"></u-steps-item>
	<u-steps-item title="运输中" desc="11:40"></u-steps-item>
</u-steps>

copy

#竖向模式

u-stepsdirection参数设置为column的话,组件将会以竖向的形式展示步骤条内容。

<template>
	<u-steps current="1" direction="column">
		<u-steps-item title="已下单" desc="10:30">
		</u-steps-item>
		<u-steps-item title="已出库" desc="10:35">
		</u-steps-item>
		<u-steps-item title="运输中" desc="11:40"></u-steps-item>
	</u-steps>
</template>

copy

#自定义图标

  • 通过activeIcon可以设置激活状态的图标
  • 通过inactiveIcon可以设置非激活状态的图标
<u-steps
	current="1" activeIcon="checkmark" inactiveIcon="arrow-right">
	<u-steps-item title="已下单" desc="10:30"></u-steps-item>
	<u-steps-item title="已出库" desc="10:35"></u-steps-item>
	<u-steps-item title="运输中" desc="11:40"></u-steps-item>
</u-steps>

copy

#通过插槽自定义样式

通过默认插槽,可以自定义某个步骤当前状态的特殊标识

<u-steps :current="1">
	<u-steps-item title="已下单" desc="10:30"></u-steps-item>
	<u-steps-item title="已出库" desc="10:35"></u-steps-item>
	<u-steps-item title="运输中" desc="11:40">
		<text class="slot-icon" slot="icon">运</text>
	</u-steps-item>
</u-steps>

<style lang="scss">
	.slot-icon {
		width: 21px;
		height: 21px;
		background-color: $u-warning;
		border-radius: 100px;
		font-size: 12px;
		color: #fff;
		line-height: 21px;
		text-align: center;
	}
</style>

相关推荐

  1. <span style='color:red;'>步骤</span><span style='color:red;'>条</span>

    步骤

    2024-01-12 20:34:01      39 阅读
  2. uView Steps 步骤

    2024-01-12 20:34:01       35 阅读
  3. uniapp步骤 组件

    2024-01-12 20:34:01       13 阅读
  4. 【uniapp】自定义步骤样式

    2024-01-12 20:34:01       24 阅读

最近更新

  1. TCP协议是安全的吗?

    2024-01-12 20:34:01       16 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2024-01-12 20:34:01       16 阅读
  3. 【Python教程】压缩PDF文件大小

    2024-01-12 20:34:01       15 阅读
  4. 通过文章id递归查询所有评论(xml)

    2024-01-12 20:34:01       18 阅读

热门阅读

  1. Linux中关于cat命令详解

    2024-01-12 20:34:01       29 阅读
  2. vue的异步更新 $nextTick

    2024-01-12 20:34:01       32 阅读
  3. 验证Lettuce在单连接上进行多路复用

    2024-01-12 20:34:01       56 阅读
  4. 10000访问量纪念日

    2024-01-12 20:34:01       38 阅读
  5. 【计算机二级考试C语言】C程序结构

    2024-01-12 20:34:01       36 阅读
  6. 算法训练营Day36

    2024-01-12 20:34:01       32 阅读
  7. 【力扣每日一题】力扣2707字符串中的额外字符

    2024-01-12 20:34:01       34 阅读
  8. 自定义Flink SourceFunction定时读取数据库

    2024-01-12 20:34:01       33 阅读
  9. 学习使用php、js脚本关闭当前页面窗口的方法

    2024-01-12 20:34:01       34 阅读