@hzab/org-list
0.0.1 • Public • Published
TODO: description
const OrgList = require('@hzab/org-list');
参数 |
类型 |
必填 |
默认值 |
说明 |
defaultBreadcrumbs |
Array |
否 |
- |
默认的面包屑数据 { title: "xxx", id: 1 } |
userConf |
Object |
否 |
- |
用户数据配置项 |
orgConf |
Object |
否 |
- |
部门数据配置项 |
globalSearchConf |
Object |
否 |
- |
全局人员搜索数据配置项 |
showEmptyOrg |
boolean |
否 |
true |
是否展示数量为 0 的部门 |
virtualized |
boolean |
否 |
false |
是否开启虚拟滚动 |
pageRow |
number |
否 |
6 |
虚拟滚动页面行数 |
hasFilter |
boolean |
否 |
true |
是否有筛选按钮 |
defaultQuery |
Object |
否 |
- |
初始的 query 数据 |
filterSchema |
Object |
否 |
- |
筛选表单 schema |
filterFormProps |
Object |
否 |
- |
筛选表单 props |
checkUser |
boolean |
否 |
true |
是否支持选中人员 |
checkOrg |
boolean |
否 |
false |
是否支持选中部门 |
onCheckedChange |
Function |
否 |
- |
选中状态改变 (userChecked, orgChecked) => void |
ItemRender |
Function |
否 |
- |
子项渲染函数 (props) => ReactElement |
ItemInfoRender |
Function |
否 |
- |
子项信息部分渲染函数 (props) => ReactElement |
checkItemShow |
Function |
否 |
- |
判断当前列表项是否展示 (item, index?: number, props?: Object) => boolean |
onItemClick |
Function |
否 |
- |
子项点击事件,返回 false 进行事件拦截 (item, props) => void | boolean |
showUser |
boolean |
否 |
- |
是否直接展示人员列表 |
hasUser |
boolean |
否 |
- |
是否存在人员列表 |
hasOrg |
boolean |
否 |
- |
是否存在部门列表 |
showFooter |
boolean |
否 |
- |
是否展示底部 |
Footer |
Function |
否 |
- |
底部渲染函数 (props) => ReactElement |
keys |
Object |
否 |
- |
出入参键名字段枚举 |
i18n |
Object |
否 |
- |
文案 |
keepBreadcrumb |
boolean |
否 |
- |
是否缓存面包屑数据 |
keepChecked |
boolean |
否 |
- |
是否选中数据 |
参数 |
类型 |
必填 |
默认值 |
说明 |
idKey |
string |
否 |
userId |
id 字段值 |
listDM |
Object |
否 |
- |
列表请求 DataModel 实例 |
listApi |
string |
否 |
- |
列表请求接口 |
getListFunc |
Function |
否 |
- |
获取列表数据的自定义函数 (query) => { pagination: { total: number; current: number }; list: Array }
|
defaultQuery |
Object |
否 |
- |
初始的 query 数据 |
showMore |
boolean |
否 |
- |
是否展示分页触发器 |
参数 |
类型 |
必填 |
默认值 |
说明 |
treeDM |
Object |
否 |
- |
部门树数据请求 DataModel 实例 |
treeApi |
string |
否 |
- |
部门树数据请求接口地址 |
参数 |
类型 |
必填 |
默认值 |
说明 |
globalSearchKeys |
Object |
否 |
- |
globalSearch 相关键名 |
userKeys |
Object |
否 |
- |
用户列表 相关键名 |
orgKeys |
Object |
否 |
- |
部门列表 相关键名 |
参数 |
类型 |
必填 |
默认值 |
说明 |
idKey |
string |
否 |
- |
id 键名 |
nameKey |
string |
否 |
- |
name 键名 |
avatarKey |
string |
否 |
- |
头像 键名 |
parentIdKey |
string |
否 |
- |
父级 id 键名 |
- 参数继承 globalSearchKeys,特有参数如下:
参数 |
类型 |
必填 |
默认值 |
说明 |
orgNameKey |
string |
否 |
- |
用户所属部门名称键名 |
orgIdKey |
string |
否 |
- |
用户所属部门 id 键名 |
- 参数继承 globalSearchKeys,特有参数如下:
参数 |
类型 |
必填 |
默认值 |
说明 |
userCountKey |
string |
否 |
- |
部门人员统计数量字段 键名 |
参数 |
类型 |
必填 |
默认值 |
说明 |
collapsePrefix |
string |
否 |
本级 |
用户折叠面板 前缀文案 |
collapseSuffix |
string |
否 |
人 |
用户折叠面板 后缀文案 |
globalSearchPlaceholder |
string |
否 |
请输入搜索内容 |
全局搜索 placeholder |
checkedPrefix |
string |
否 |
当前选中 |
底部选中前缀文案 |
checkedSuffix |
string |
否 |
个 |
底部选中后缀文案 |
Versions
Version | Downloads (Last 7 Days) | Tag |
---|
0.0.1 | 0 | latest |
Version History
Version | Downloads (Last 7 Days) | Published |
---|
0.0.1 | 0 | |
Package Sidebar
Install
Weekly Downloads