1.0.42 • Published 4 years ago

kc-bff-components v1.0.42

Weekly downloads
1
License
MIT
Repository
-
Last release
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

  • 采用 Ant Design 的按需加载方案 babel-plugin-import 会引起一些报错,暂时采用手动引入 CSS 样式解决。

组件

GroupDetailCard

展示

CARMODEL(新车)

CARMODEL

SECOND_HAND_CAR(二手车)
MAINTAIN(保养)

API

参数说明类型默认值
datagetremove 回调内容type IGDC-
contextgetremove 绑定上下文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表格行是否可选择,配置项Objectundefined
columns表格列的配置描述,具体项见下表ColumnProps[]-
tableGet默认使用分页器时起效果,在 onShowSizeChangeonChange 钩子中执行(钩子参阅Pagination分页Function() => {}
table表格数据ImmutablePropTypes.list-
count数据总数Number0
searchDatatableGet 方法使用时传入的请求参数ImmutablePropTypes.map-
loading页面是否加载中Boolean-
tablesHeightType已经定义好的 --tables-height 对应的值enum TablesHeightType-
tablesHeight手动设置 --tables-height 的值,优先级次于 tablesHeightTypeNumber | String-
appendParamstableGet 方法使用时追加的第二参数起步,取决于你的数组的长度any[]-
tableSize表格大小String'middle'
pagination分页器,参考配置项或 pagination 文档,设为 false 时不展示和进行分页Object | Booleantrue

TablesHeightType

对应值
1S250px (pagination = false: 194px)
2S293px
3S336px
1S1B300px (pagination = false: 244px)
2S1B343px

FormBasicInfo

API

参数说明类型默认值
----

Pagination

API

参数说明类型默认值
----

LayoutAddBtns

API

参数说明类型默认值
----

方法

lookImage

Params

参数说明类型默认值
----