更新记录
1.0.3(2025-11-04) 下载此版本
fix:组件主题
1.0.2(2024-08-06) 下载此版本
修改文档
1.0.1(2024-07-30) 下载此版本
适配r-config-provider
查看更多平台兼容性
uni-app(4.52)
| Vue2 | Vue3 | Chrome | Safari | app-vue | app-nvue | Android | iOS | 鸿蒙 |
|---|---|---|---|---|---|---|---|---|
| × | √ | √ | √ | √ | √ | √ | √ | √ |
| 微信小程序 | 支付宝小程序 | 抖音小程序 | 百度小程序 | 快手小程序 | 京东小程序 | 鸿蒙元服务 | QQ小程序 | 飞书小程序 | 快应用-华为 | 快应用-联盟 |
|---|---|---|---|---|---|---|---|---|---|---|
| √ | √ | √ | √ | √ | √ | √ | √ | √ | √ | √ |
r-steps
r-steps步骤条,用于展示操作流程的各个环节,让用户了解当前的操作在整体流程中的位置。
示例
<template>
<r-config-provider>
<view style="padding: 20rpx">
<r-divider content-position="left">基本使用</r-divider>
<r-steps
:active="active"
@click-step="
(index) => {
active = index;
}
"
>
<r-step>买家下单</r-step>
<r-step>商家接单</r-step>
<r-step>买家提货</r-step>
<r-step>交易完成</r-step>
</r-steps>
<r-divider content-position="left">自定义样式</r-divider>
<r-steps
:active="active2"
active-icon="success"
active-color="#07c160"
inactive-icon="arrow"
@click-step="
(index) => {
active2 = index;
}
"
>
<r-step>买家下单</r-step>
<r-step>商家接单</r-step>
<r-step>买家提货</r-step>
<r-step>交易完成</r-step>
</r-steps>
<r-divider content-position="left">竖向步骤条 </r-divider>
<r-steps
direction="vertical"
:active="active3"
@click-step="
(index) => {
active3 = index;
}
"
>
<r-step>
<view>【城市】物流状态1</view>
<text>2016-07-12 12:40</text>
</r-step>
<r-step>
<view>【城市】物流状态2</view>
<text>2016-07-11 10:00</text>
</r-step>
<r-step>
<view>快件已发货</view>
<text>2016-07-10 09:30</text>
</r-step>
</r-steps>
</view>
</r-config-provider>
</template>
<script setup>
import { ref } from "vue";
const active = ref(1);
const active2 = ref(2);
const active3 = ref(0);
</script>
API
Steps Props
| 名称 | 说明 | 类型 | 默认值 | 可选值 |
|---|---|---|---|---|
| active | 当前步骤对应的索引值 | Number | String | 0 |
- |
| direction | 步骤条方向 | String | horizontal |
vertical |
| activeIcon | 当前步骤对应的底部图标 | String | checked |
- |
| inactiveIcon | 非当前步骤对应的底部图标 | String | - | - |
| finishIcon | 已完成步骤对应的底部图标,优先级高于 inactiveIcon | String | - | - |
| activeColor | 当前步骤和已完成步骤的颜色 | String | #1989fa |
- |
| inactiveColor | 未激活步骤的颜色 | String | #969799 |
|
| iconPrefix | 图标类名前缀 | String | van-icon |
|
| themeName | r-theme 主题名称 | String | default |
Steps Events
| 名称 | 说明 | 参数 |
|---|---|---|
| click-step | 点击步骤的标题或图标时触发 | index |
Step Slots
| 名称 | 说明 |
|---|---|
| default | 步骤内容 |
| activeIcon | 自定义激活状态图标 |
| inactiveIcon | 自定义未激活状态图标 |
| finishIcon | 自定义已完成步骤对应的底部图标,优先级高于 inactiveIcon |
更多组件,请前往rainui

收藏人数:
https://gitee.com/uv86e/rainui.git
下载插件并导入HBuilderX
下载示例项目ZIP
赞赏(0)
下载 1892
赞赏 11
下载 11740357
赞赏 1818
赞赏
京公网安备:11010802035340号