UNPKG

@aliretail/react-materials-components

Version:
52 lines (47 loc) 2.83 kB
--- title: DeliverGoodsDialog-API order: 1 category: UI description: DeliverGoodsDialog 组件描述 screenshot: https://gw.alicdn.com/imgextra/i2/O1CN01yW3hCD1M8CnqeKFlq_!!6000000001389-2-tps-90-90.png --- 完成发货操作 ## props ```text interface IDeliverGoodsDialogProps { handleOk?: () => void; // 点击确定接口请求成功回调 handleClose?: () => void; // 点击关闭回调 children?: ReactElement; // 触发dialog的子元素 logisticsCompanyDataSource?: ILogisticsCompanyItem[]; //物流公司数据源 logisticsAppCode?: string; // 获取物流公司数据源的接口appCode logisticsApiCode?: string; // 获取物流公司数据源的接口apiCode visible?: boolean; // dialog是否显示 params?: object; // 接口请求需要的额外参数 title?: string; // dialog标题 appCode: string; // 接口请求的appCode apiCode: string; // 接口请求的apiCode labelText?: string; // 第一行展示的文案的label,默认为售后单号 valueText?: string | number; // 第一行展示的文案的value,默认为- } interface ILogisticsCompanyItem { code: string | number; name: string; id?: string | number; } ``` ## API | 参数名 | 说明 | 必填 | 类型 | 默认值 | 备注 | | ------ | ---- | ---- | ---- | ------ | ---- | | handleOk | 点击确定接口请求成功回调 | N | function | () => viod | | | handleClose | 点击关闭回调 | N | function | () => viod | | | children | 触发dialog的子元素 | N | ReactElement | <></> | | | logisticsCompanyDataSource | 物流公司数据源 | N | | 无 | [{name: '', code: '', id?: ''}] | | logisticsAppCode | 获取物流公司数据源的接口appCode | N | string | 无 | 若传入logisticsCompanyDataSource则无需传入该字段 | | logisticsApiCode | 获取物流公司数据源的接口apiCode | N | string | 无 | 若传入logisticsCompanyDataSource则无需传入该字段 | | visible | dialog是否显示 | N | string | false | 有children则无需传入该字段, children点击会触发dialog显示 | | title | dialog标题 | N | string | 发货 | | | appCode | 发货接口请求的appCode | Y | string | | 必传 | | apiCode | 发货接口请求的apiCode | Y | string | | 必传 | | labelText | 第一行展示的文案的label | N | string | 售后单号 | | | valueText | 第一行展示的文案的value | N | string | - | | | params | 接口请求需要的额外参数 | N | object | {} | 发货提交接口需要的额外入参,默认只提交logisticsNo,logisticsCompanyName,logisticsCompanyCode, 若物流公司数据源中有id字段则默认入参还有logisticsCompanyId|