01 / Overview
cu-shop-receipt-card
确认收货场景卡片:脱敏收货人 / 手机号、两行截断的收货地址、预计送达与物流入口,确认收货走内部二次确认弹窗。
履约
10 条 props
3 事件
已实现
02 / Demo
实时预览
演示页:/pages/shop/receipt-card。右侧的预览由站点脚本把 H5 演示页装进 iframe;数据与交互在演示页内操作,不在此处留静态截图。
依赖
- 基础件:
cu-button、cu-modal - Shop 共享件:
locale/index.uts(cuShopT)
03 / Props · Events · Slots
全量契约
props
| 参数 | 说明 | 类型 | 默认值 |
|---|---|---|---|
| receiver | 收货人(已脱敏) | string | '' |
| phone | 手机号(已脱敏) | string | '' |
| address | 完整地址,行内两行截断 | string | '' |
| expectTime | 预计送达文案 | string | '' |
| status | pending / signed | string | 'pending' |
| showConfirm | 是否显示确认收货按钮 | boolean | true |
| customStyle | 根节点自定义样式 | Object | {} |
| customClass | 根节点自定义类名 | string | '' |
| url | 透传字段,本件未接线 | string | '' |
| linkType | 透传字段,本件未接线 | string | 'navigateTo' |
events
| 事件 | 说明 | 载荷 |
|---|---|---|
| @confirm | 二次确认弹窗点「确认」后发出 | 无 |
| @clickAddress | 点地址;地址为空时不发 | { address } |
| @clickLogistics | 点「查看物流」 | { status } |
slots
| 插槽 | 作用域 | 说明 |
|---|---|---|
| extra | 无 | 预计送达行下方追加内容 |
| footer | 无 | 最底部追加内容 |
04 / Example
代码示例
<cu-shop-receipt-card :receiver="receiver" :phone="phone" :address="address" :expectTime="expectTime"
:status="'pending'" :showConfirm="true" @confirm="onConfirm" @clickAddress="onClickAddress"
@clickLogistics="onClickLogistics" />
05 / Notes
注意事项
确认收货必须先过内部 cu-modal(文案「请确认已收到商品」);确认后只发 confirm,组件不改状态。
status='signed' 时按钮为「已完成」并禁用;showConfirm=false 时整块按钮不渲染。
status 取值对齐字典的 signed(方案原文写作 received,见台账 193)。
事件名在模板里写作 @clickAddress / @clickLogistics(卡片文档的 kebab 形式同义)。
不请求接口、不持久化、不弹 toast。
安装 colorui-shop 全量包与安装任意 cu-shop-* 单件包二选一,不要同时装。单件包的前提是已安装完整 colorui-x。