1.0.42 • Published 4 years ago
KingCar BFF 组件库
为君嘉车云贷组后端开发提供的 React 组件二次封装库
安装
推荐使用 yarn
yarn add kc-bff-components@latest --registry http://192.168.1.223:4873
npm install kc-bff-components@latest --registry http://192.168.1.223:4873
TODO
组件
GroupDetailCard
展示
CARMODEL(新车)
SECOND_HAND_CAR(二手车)
MAINTAIN(保养)
API
参数 | 说明 | 类型 | 默认值 |
---|
data | get ,remove 回调内容 | type IGDC | - |
context | get ,remove 绑定上下文 | Any | - |
style | 卡片样式 | Object | {} |
*get | 编辑按钮方法 | Function | - |
*remove | 删除按钮方法 | Function | - |
type IGDC = {
refererType: enum ['ACTIVITE', 'CARMODEL', 'MAINTAIN', 'WAP', 'SECOND_HAND_CAR']
sort: String
status: enum ['y', 'n']
labelName: String
firstPayment: String
monthlyPayment: String
subheading: String
salePrice: String
originalPrice: String
targetUrl: String
loading: String
mileage: String
plateDate: String
plateLocation: String
}
Table
API
参数 | 说明 | 类型 | 默认值 |
---|
rowKey | 表格行 key 的取值,可以是字符串或一个函数 | string|Function(record):string | (record, index) => record.id || index || rowkey |
className | 追加样式 | String | - |
style | 追加样式 | Object | - |
scroll | 设置横向或纵向滚动,也可用于指定滚动区域的宽和高,可以设置为像素值,百分比,true 和 'max-content' | { x: number | true, y: number } | undefined |
rowSelection | 表格行是否可选择,配置项 | Object | undefined |
columns | 表格列的配置描述,具体项见下表 | ColumnProps[] | - |
tableGet | 默认使用分页器时起效果,在 onShowSizeChange 和 onChange 钩子中执行(钩子参阅Pagination分页) | Function | () => {} |
table | 表格数据 | ImmutablePropTypes.list | - |
count | 数据总数 | Number | 0 |
searchData | tableGet 方法使用时传入的请求参数 | ImmutablePropTypes.map | - |
loading | 页面是否加载中 | Boolean | - |
tablesHeightType | 已经定义好的 --tables-height 对应的值 | enum TablesHeightType | - |
tablesHeight | 手动设置 --tables-height 的值,优先级次于 tablesHeightType | Number | String | - |
appendParams | tableGet 方法使用时追加的第二参数起步,取决于你的数组的长度 | any[] | - |
tableSize | 表格大小 | String | 'middle' |
pagination | 分页器,参考配置项或 pagination 文档,设为 false 时不展示和进行分页 | Object | Boolean | true |
TablesHeightType
值 | 对应值 |
---|
1S | 250px (pagination = false: 194px) |
2S | 293px |
3S | 336px |
1S1B | 300px (pagination = false: 244px) |
2S1B | 343px |
FormBasicInfo
API
Pagination
API
LayoutAddBtns
API
方法
lookImage
Params