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-phoenix/field-user

v3.3.55

Published

| 参数 | 说明 | 类型 | 默认值 | 是否必传 | | ---------------------------- | ----------------------------------------------------------

Downloads

540

Readme

| 参数 | 说明 | 类型 | 默认值 | 是否必传 | | ---------------------------- | --------------------------------------------------------------------- | -------------------- | ----------------------------------- | -------- | | disabled | 该输入项是否禁用 | boolean | false | No | | userTranslation | 选人组件多语言翻译文字 | object | No | No | | placeholder | 输入框的占位符 | string | | No | | multiple | 是否可以多选 | boolean | false | No | | hasError | 是否显示错误 | boolean | false | No | | isPreview | 是否用于表单展示态 | boolean | false | No | | value | 已选的值 | Staff | Staff | | No | | tenantId | 租户 id | string | | Yes | | userId | 用户 id | string | | Yes | | host | api 接口 | string | //www.italent.cn | No | | isAdvance | 是否开启高级搜索(在单选场景下无效) | boolean | false | No | | onChange | 选择人员的回调 | (data:Staff | Staff[]) => void | | No | | onError | ajax 请求出错的回调函数 | (e) => void | | No | | hideTabs | 隐藏一个或者多个 tab(暂不支持隐藏所有) | array | | No | | dataProvideByExternalPromise | 组件是否使用外部数据 | boolean | | No | | contactPromise | 外部数据-常用联系人函数(返回 promise) | () => promise | | No | | staffPromise | 外部数据-我的下属函数(返回 promise) | () => promise | | No | | departmentPromise | 外部数据-所有部门函数(返回 promise) | () => promise | | No | | departmentStaffPromise | 外部数据-部门下面的员工函数(返回 promise) | (staffId) => promise | | No | | searchPromise | 外部数据-search 函数(返回 promise) | (string) => promise | | No | | getPopupContainer | 弹层挂载的容器(默认是挂载到 body 下,通过此函数可以改变弹层挂载的节点) | Funtion | | No |

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

export interface Staff {
	Id: number;
	Name: string;
	Email: string;
	Avatar: string;
	AvatarColor: string;
	DepartmentId: number;
}
export const defaultTranslation: DefaultTranslationType = {
	search: '搜索',
	advancedMode: '高级模式',
	noDataTip: '这里什么都没有...',
	emptyText: '空 (未填写)',
	commonContact: '常用',
	subordinate: '下属',
	department: '部门',
	searchResult: '搜索结果',
	frequentContacts: '常用联系人',
	person: '人',
	my: '我的',
	aleradySelect: '已选人员',
	group: '组',
	clearSelect: '清空已选',
	cancel: '取消',
	sure: '确认',
	pleaseSelectTip: '请在左侧选择人员',
	one: '个',
	empty: '空(未填写)',
	directSubordinate: '直接下属'
}
默认值 examples
const value = [
	{
		Avatar:
			'//cache.tita.gift/Image/100013/3bbe4b2a5e5f4fcb976812bc0f77d404_s.jpg',
		AvatarColor: '#f79c6f',
		DepartmentId: null,
		Email: '[email protected]',
		Id: 111469971,
		Name: 'yangqianqian'
	}
];
使用外部数据的 examples 请参考 http://gitlab.beisencorp.com/ux-phoenix/person-selector/tree/master