电商组件 / 发票 / cu-shop-receive-invoice-list 收票人列表
01 / Overview

cu-shop-receive-invoice-list

收票人多选列表:默认标、姓名、电话与地址信息,可展开扩展信息行,支持删除按钮与自定义编辑入口。

发票 11 条 props 3 事件 已实现
02 / Demo

实时预览

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

依赖

  • 基础件:cu-tag、cu-button
  • Shop 共享件:locale/index.uts(cuShopT)
03 / Props · Events · Slots

全量契约

props

参数说明类型默认值
defaultValue当前选中的收票人 idstring''
list收票人数组;字段兼容实体 phone / province + city + district + detail / ext 与参考 tel / addres / extends[]Array[]
enableDelete是否显示删除按钮booleanfalse
showDefault是否显示默认标booleantrue
showEdit是否显示编辑入口booleantrue
showExtends是否显示扩展信息行booleantrue
showAddress是否显示电话与地址两行booleantrue
customStyle根节点自定义样式Object{}
customClass根节点自定义类名string''
url透传字段,本件未接线string''
linkType透传字段,本件未接线string'navigateTo'

events

事件说明载荷
@selected选中一位收票人;点已选中项时取消选中且不发事件{ item, index }
@edit点编辑入口{ item, index }
@delete点删除按钮(仅 enableDelete 为 true){ item, index }

slots

插槽作用域说明
edit无自定义编辑入口;不传时显示「编辑」文案
04 / Example

代码示例

uvue
<cu-shop-receive-invoice-list :list="receivers" :defaultValue="'receiver-3001'" :enableDelete="true"
	@selected="onSelected" @edit="onEdit" @delete="onDelete">
	<template #edit><text>修改</text></template>
</cu-shop-receive-invoice-list>
05 / Notes

注意事项

删除为显式按钮(参考实现用滑动操作),仅发事件,不自行移除列表项。

扩展信息优先取 extends[](label / value),为空时取单个 ext 对象(key / label / value)。

电话优先取 phone,回落 tel;地址优先拼 province + city + district + detail,为空回落 addres。

列表为空时显示「暂无收票人」占位。

选中态由组件内部维护并接受 defaultValue 同步;点已选中项取消选中,不发 selected。

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

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