电商组件 / 订单 / cu-shop-order-progress 订单进度
01 / Overview

cu-shop-order-progress

订单详情的物流与履约进度条:按节点数组渲染横向或纵向轨迹,当前节点高亮,异常节点同时用颜色与文案标记。

订单 8 条 props 1 事件 已实现
02 / Demo

实时预览

演示页:/pages/shop-order/order-progress。右侧的预览由站点脚本把 H5 演示页装进 iframe;数据与交互在演示页内操作,不在此处留静态截图。

依赖

  • 基础件:无
  • Shop 共享件:locale/index.uts(cuShopT)、utils/shop-date.uts(formatMonthDay)
  • 实体:ShopOrderProgressNode(code / title / text / createdAt / isActive)
03 / Props · Events · Slots

全量契约

props

参数说明类型默认值
nodes节点数组(ShopOrderProgressNode);可选 status 取 done / current / pending / exceptionArray[]
current当前节点下标;越界时回退首个 isActive 节点,再回退 0number0
vertical是否纵向;节点数超过 5 时强制纵向booleanfalse
showTime是否显示节点时间booleantrue
customStyle根节点自定义样式Object{}
customClass根节点自定义类名string''
url透传字段,本件未接线string''
linkType透传字段,本件未接线string'navigateTo'

events

事件说明载荷
@clickNode点击某一节点{ node, index }

slots

插槽作用域说明
extra无进度列表上方补充内容
footer无进度列表下方补充内容
04 / Example

代码示例

uvue
<cu-shop-order-progress :nodes="progress.nodes" :current="progress.currentIndex" :showTime="true"
	@clickNode="onClickNode" />
05 / Notes

注意事项

节点状态优先读可选 status;缺省按 current 与下标推导 done / current / pending。

节点数超过 5 或 vertical=true 时转纵向,横向最多 5 个节点。

异常节点用红点加「异常」角标,颜色与文案同时表达。

时间走 formatMonthDay 格式化为「月日」,createdAt 为空不显示。

不请求接口、不持久化、不弹 toast。

安装 colorui-shop 全量包与安装任意 cu-shop-* 单件包二选一,不要同时装。单件包的前提是已安装完整 colorui-x。