npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@hzab/org-list-mobile

v0.0.1

Published

移动端部门人员树组件

Downloads

59

Readme

@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 | 否 | 个 | 底部选中后缀文案 |