UNPKG

@aliretail/react-materials-components

Version:
52 lines (46 loc) 4.4 kB
--- title: SettlementConfigurationTable-API order: 1 category: UI description: SettlementConfigurationTable 组件描述 screenshot: https://gw.alicdn.com/imgextra/i2/O1CN01yW3hCD1M8CnqeKFlq_!!6000000001389-2-tps-90-90.png --- 关联主对象表单项 ## props ```text interface IService { apiCode: string; // 获取数据源的apiCode appCode: string; // 获取数据源的appCode params?: any; // 获取数据源的接口的额外参数 } interface IRequestMap { table: IService; relateSelect: IService; deleted: IService; save: IService; disabled: IService; } interface IRequestUrl { tableUrl: string; selectUrl: string; deleteUrl: string; saveUrl: string; disabledUrl: string; } interface ISettlementConfigurationTableProps { columns: Array<any>; // 表格列配置项 requestMap: IRequestMap; // 接口配置 url?: IRequestUrl; // 请求url handleSave?: () => void; // 点击保存接口请求成功回调 handleDelete?: () => void; // 点击删除接口请求成功回调 } ``` ## API | 参数名 | 说明 | 必填 | 类型 | 默认值 | 备注 | | ------------ | ------------------------ | ---- | ----------- | ------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | columns | 表格列表配置 | Y | array | | 必传 | | requestMap | 接口配置 | Y | IRequestMap | | 包含获取 table 列表接口、获取下拉离列表接口、保存、删除、启用禁用接口。 requestMap: { table: {apiCode, appCode, params},relateSelect: {apiCode, appCode, params},deleted: {apiCode, appCode, params},save: {apiCode, appCode, params},disabled: {apiCode, appCode, params}} | | url | 接口请求 url | N | IRequestUrl | | 包含获取 table 列表接口、获取下拉离列表接口、保存、删除、启用禁用接口 url。 url: { tableUrl: '',select: '',deletedUrl: '',saveUrl: '',disabledUrl: ''} | | handleSave | 点击保存接口请求成功回调 | N | function | (value: any) => void | value: onChange 的值; index: 当前表格行数 index; record: 当前表格 row 的数据; 值; | | handleDelete | 点击删除接口请求成功回调 | N | function | (value: any) => void | value: onChange 的值; index: 当前表格行数 index; record: 当前表格 row 的数据; 值; | | handleChange | 列配置组件 onChange 回调 | N | function | (value: any, index: any, record: any, dataIndex: any) => void | value: onChange 的值; index: 当前表格行数 index; record: 当前表格 row 的数据; dataIndex: 当前 onChange 组件的 key |