@hzab/org-list-mobile

0.0.2 • Public • Published

@hzab/org-list-mobile

TODO: description

Usage

const OrgList = require('@hzab/org-list-mobile');

API

InfoPanel Attributes

参数 类型 必填 默认值 说明
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 - 是否选中数据

userConf

参数 类型 必填 默认值 说明
idKey string userId id 字段值
listDM Object - 列表请求 DataModel 实例
listApi string - 列表请求接口
getListFunc Function - 获取列表数据的自定义函数 (query) => { pagination: { total: number; current: number }; list: Array }
defaultQuery Object - 初始的 query 数据
showMore boolean - 是否展示分页触发器

orgConf

  • 参数继承 userConf,特有参数如下:
参数 类型 必填 默认值 说明
treeDM Object - 部门树数据请求 DataModel 实例
treeApi string - 部门树数据请求接口地址

globalSearchConf

  • 参数继承 userConf

keys

参数 类型 必填 默认值 说明
globalSearchKeys Object - globalSearch 相关键名
userKeys Object - 用户列表 相关键名
orgKeys Object - 部门列表 相关键名
globalSearchKeys
参数 类型 必填 默认值 说明
idKey string - id 键名
nameKey string - name 键名
avatarKey string - 头像 键名
parentIdKey string - 父级 id 键名
userKeys
  • 参数继承 globalSearchKeys,特有参数如下:
参数 类型 必填 默认值 说明
orgNameKey string - 用户所属部门名称键名
orgIdKey string - 用户所属部门 id 键名
orgKeys
  • 参数继承 globalSearchKeys,特有参数如下:
参数 类型 必填 默认值 说明
userCountKey string - 部门人员统计数量字段 键名

i18n

参数 类型 必填 默认值 说明
collapsePrefix string 本级 用户折叠面板 前缀文案
collapseSuffix string 用户折叠面板 后缀文案
globalSearchPlaceholder string 请输入搜索内容 全局搜索 placeholder
checkedPrefix string 当前选中 底部选中前缀文案
checkedSuffix string 底部选中后缀文案

Readme

Keywords

none

Package Sidebar

Install

npm i @hzab/org-list-mobile

Weekly Downloads

20

Version

0.0.2

License

ISC

Unpacked Size

215 kB

Total Files

35

Last publish

Collaborators

  • wzj_npm
  • caiyansong