1.0.1 • Published 2 years ago

@m-materials/com-list v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

ComList

@m-materials/com-list

带远程加载功能的下拉列表

API

参数名说明必填类型默认值备注
form参考 antd 的Form组件falseobject
afterSelect选择数据行后触发该事件false(item: T, index: number)
disabled组件失效状态falsebooleanfalse
showSearch显示快速搜索falsebooleanfalse
searchProperties搜索接口数据属性配置falsestring[]['code', 'name']
dataSource静态数据源falseobject[]
defaultValue默认值falsestring
store数据接口对象,参考配置项(#StorePropsfalseobject
cascadeParams级联参数配置object-
width下拉数据面板默认宽度falsenumber
field与Reader中的参数对应,可将其参数名称转为对应名称。falsestring[]一般用于form表单中获取多个自定义名称参数
reader下拉参数读取设置falsenumber一般用于form表单中获取多个自定义名称参数
listProps列表属性配置,参考配置项object-

StoreProps

参数说明类型默认值版本
params接口请求参数object-
type接口请求类型'GET' | 'POST'GET
url接口请求地址string-
autoLoad初始化时自动获取数据booleanfalse

ListProps

参数说明类型默认值版本
itemLayout设置列表布局, 设置成 vertical 则竖直样式显示, 默认横排'vertical' | 'horizontal''horizontal'
renderItem自定义渲染列表项Function(item: T, index: number) => React.ReactNode-

Reader

参数说明类型默认值版本
data截取的数据节点string-
description次要信息属性名string-
fieldComboList 属性 field 映射,属性名必须一一对应string[]-
name显示的属性名,ComboList 属性 name 映射string-