01 / Overview
cu-shop-order-detail-header
订单详情页顶部的状态区:展示订单状态、副标题、待付款倒计时与进度入口,状态图形用几何色块占位。
订单
10 条 props
2 事件
已实现
02 / Demo
实时预览
演示页:/pages/shop-order/order-detail-header。右侧的预览由站点脚本把 H5 演示页装进 iframe;数据与交互在演示页内操作,不在此处留静态截图。
依赖
- 基础件:
cu-count-down - Shop 共享件:
locale/index.uts(cuShopT) - 实体:
ShopOrder(消费status;statusText与副标题由宿主传入)
03 / Props · Events · Slots
全量契约
props
| 参数 | 说明 | 类型 | 默认值 |
|---|---|---|---|
| status | 订单状态,取 order.status 枚举;未知值按 unknown 取词 | string | '' |
| statusText | 覆盖状态文案;空则按 status 取词 | string | '' |
| subtitle | 副说明,2 行截断 | string | '' |
| countdownMs | 倒计时毫秒;0 不显示 | number | 0 |
| theme | primary / success / warning / danger / neutral,越界回落 primary | string | 'primary' |
| showProgress | 是否显示进度入口 | boolean | true |
| customStyle | 根节点自定义样式 | Object | {} |
| customClass | 根节点自定义类名 | string | '' |
| url | 透传字段,本件未接线 | string | '' |
| linkType | 透传字段,本件未接线 | string | 'navigateTo' |
events
| 事件 | 说明 | 载荷 |
|---|---|---|
| @countdownFinish | 倒计时归零;同一次倒计时只发一次 | 无 |
| @clickProgress | 点击进度入口 | 无 |
slots
| 插槽 | 作用域 | 说明 |
|---|---|---|
| icon | 无 | 替换默认几何色块状态图形 |
| extra | 无 | 头部下方补充内容;默认空 |
04 / Example
代码示例
<cu-shop-order-detail-header status="pending-payment" :countdownMs="3600000" theme="warning"
@countdownFinish="onCountdownFinish" @clickProgress="onClickProgress" />
05 / Notes
注意事项
状态色只从 theme 取,不接受任意色值。
倒计时归零只发一次 countdownFinish;countdownMs 改为新的正值后可再次触发。
副标题最多 2 行(max-height: 80rpx),超出截断。
状态图形为几何色块占位,不引图标字体;自定义图形用 icon 插槽。
不请求接口、不持久化、不弹 toast。
安装 colorui-shop 全量包与安装任意 cu-shop-* 单件包二选一,不要同时装。单件包的前提是已安装完整 colorui-x。