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

@beisen/ocean-person-selector-input

v2.4.7

Published

| 属性 |说明 | 类型| 必须配置 | 默认值| | ------------ |-------|--------| -----|-----| | status | 状态描述(可选值包括 'normal' 'disabled' 'error') | string | normal | | value | 已选值 | {Name:string,Id:number,Email:string,AvatarColor:string,DepartmentId:number}[] | no | []|

Downloads

79

Readme

| 属性 |说明 | 类型| 必须配置 | 默认值| | ------------ |-------|--------| -----|-----| | status | 状态描述(可选值包括 'normal' 'disabled' 'error') | string | normal | | value | 已选值 | {Name:string,Id:number,Email:string,AvatarColor:string,DepartmentId:number}[] | no | []| | trigger | 自定义dom(用来触发弹层) | JSX.Element | @beisen-phoenix/input | | apiPath | 接口请求前缀,形如(http://www.italent-inc.cn) | string | yes(仅在使用内置APi模式下需要)| 无 | tenantId | BSGlobal.tenantInfo中的Id | string、number | yes(仅在使用内置APi模式下需要)| 无 | userId | BSGlobal.loginUserInfo中的Id | string、number | yes(仅在使用内置APi模式下需要)| 无 | onSure | 点击确定按钮后的回调 | (val: array): void | no | 无 | onError | fetch数据发生error后的回调 | (er: error): void | no | 无 | onCancel | 点击取消按钮后的回调 | Function | no | 无 | onChange | 高级模式下数据变动回调 | Function | no | 无 | advanceMode | 高级/普通模式开关 | bool | yes| 无 | translation | 多语言翻译文字 | object | no| 请参考下面的translate说明 | hideTabs | 隐藏一个或者多个tab(暂不支持隐藏所有) | array | no| 请参考下面的hideTabs说明 | hideAdvanceModeText | 普通模式下隐藏'高级模式'文字 | bool | no| false | dataProvideByExternalPromise | 组件是否使用外部数据 | bool | no| false | contactPromise | 外部数据-常用联系人函数(返回promise) | ()=>Promise | no| 无 | staffPromise | 外部数据-我的下属函数(返回promise) | ()=>Promise | no| 无 | departmentPromise | 外部数据-所有部门函数(返回promise) | ()=>Promise | no| 无 | departmentStaffPromise | 外部数据-部门下面的员工函数(返回promise) | (staffId)=>Promise | no| 无 | searchPromise | 外部数据-search函数(返回promise) | (string)=>Promise | no| 无 | zIndex | 控制层级| number | no| 1050

注意

  • 若使用内置接口,依据平台现有选人组件的数据请求方式,所有数据方式为 get,请求url已经内置,为了更好的兼容性,请必须配置apiPath、tenantId、userId。
  • 选人没有内置弹层,需要依赖非模态组件,请参考:http://cmp.italent-inc.cn/details?id=1064
  • apiPath 的前缀必须要有 // 或者http:// 或者https://
  • value 仅支持高级模式
  • value 的数据格式为
interface Staff {
    Id: number,
    Name: string,
    Email: string,
    Avatar: string,
    AvatarColor: string,
    DepartmentId: number
}
  • 使用外部数据,搜索结果、常用联系人、我的下属、部门下面的员工接口,请提供Staff[], Staff的结构如下
export interface Staff {
    Id: number,
    Name: string,
    Email: string,
    Avatar: string,
    AvatarColor: string,
    DepartmentId: number
}

部门数据,请提供Department[],Department的结构如下

export interface Department {
    Id: number,
    PId: number,
    DepartmentName: string,
    TotalUserCount: number
}

####hideTabs字段说明 hideTabs array可以使用的字段有

export enum TabType {
    'commonContact'="commonContact",
    'subordinate'='subordinate',
    'department'='department'
};

比如我要取消常用联系人+我的下属的显示,就传递 ['commonContact','subordinate'], 暂不支持隐藏所有tabName,如果传递了所有的tabName,将会忽略该字段

translate字段说明--默认翻译字段


export const defaultTranslation: DefaultTranslationType = {
	search: '搜索',
	advancedMode: '高级模式',
	noDataTip: '这里什么都没有...',
	emptyText: '空 (未填写)',
	common: '常用',
	subordinate: '下属',
	department: '部门',
	searchResult: '搜索结果',
	contacts: '联系人',
	person: '人',
	my: '我的',
	aleradySelect: '已选人员',
	group: '组',
	clearSelect: '清空已选',
	cancel: '取消',
	sure: '确认',
	pleaseSelectTip: '请在左侧选择人员',
	one: '个',
	empty: "空(未填写)"
}