# @beisen-cmps/ux-m-platform-user-select

> # UserSelect人员选择

Latest version **0.1.14** (published 2019-01-15) · ISC license · 0 weekly downloads

## Install

```sh
npm install @beisen-cmps/ux-m-platform-user-select
pnpm add @beisen-cmps/ux-m-platform-user-select
yarn add @beisen-cmps/ux-m-platform-user-select
bun add @beisen-cmps/ux-m-platform-user-select
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.14 |
| Published | 2019-01-15 |
| First published | 2018-06-14 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 11 |
| Unpacked size | 162.2 KB |
| Known vulnerabilities | 0 (+4 in 1 direct dependencies) |
| Install scripts | no |
| Author | beisen |
| Maintainers | beisencorp |
| Keywords | beisen, react-component, es6 |

## Links

- npm: https://www.npmjs.com/package/@beisen-cmps/ux-m-platform-user-select
- Repository: git@gitlab.beisencorp.com:ux-share-platform/ux-m-platform-user-select
- npm.io page: https://npm.io/package/@beisen-cmps/ux-m-platform-user-select

## Dependencies (11)

- [react](https://npm.io/package/react.md) ^15.6.2
- [marked](https://npm.io/package/marked.md) ^0.4.0
- [react-dom](https://npm.io/package/react-dom.md) ^15.6.2
- [classnames](https://npm.io/package/classnames.md) ^2.1.3
- [react-tap-event-plugin](https://npm.io/package/react-tap-event-plugin.md) ^2.0.1
- [@beisen-cmps/ux-m-platform-nav](https://npm.io/package/@beisen-cmps/ux-m-platform-nav.md)
- [@beisen-cmps/ux-m-platform-icon](https://npm.io/package/@beisen-cmps/ux-m-platform-icon.md)
- [@beisen-cmps/ux-m-platform-page](https://npm.io/package/@beisen-cmps/ux-m-platform-page.md)
- [@beisen-cmps/ux-m-platform-avatar](https://npm.io/package/@beisen-cmps/ux-m-platform-avatar.md)
- [@beisen-cmps/ux-m-platform-content](https://npm.io/package/@beisen-cmps/ux-m-platform-content.md)
- [@beisen-cmps/ux-m-platform-bound-loading](https://npm.io/package/@beisen-cmps/ux-m-platform-bound-loading.md)

## Recent versions

- 0.1.14 (latest) — 2019-01-15
- 0.1.11 — 2018-08-12
- 0.1.10 — 2018-08-09
- 0.1.8 — 2018-06-20
- 0.1.7 — 2018-06-20
- 0.1.6 — 2018-06-20
- 0.1.5 — 2018-06-19
- 0.1.4 — 2018-06-17
- 0.1.3 — 2018-06-17
- 0.1.1 — 2018-06-17
- 0.1.0 — 2018-06-17
- 0.0.9 — 2018-06-17
- 0.0.8 — 2018-06-16
- 0.0.7 — 2018-06-15
- 0.0.6 — 2018-06-14
- … 5 more at https://npm.io/package/@beisen-cmps/ux-m-platform-user-select/versions

## README

## 组件使用、扩展文档

# UserSelect人员选择

用于人员选择


### UI规则

1. 分为导航栏、搜索区、选人区。

2. 选人区域，点击一个人员后，展示在搜索区中的已选人员区域。

3. 已选人员在搜索区展示，点击已选人员头像，删除该人。

4. 在搜索框内，如没有输入搜索内容，点击删除，最后一个人置灰，连续点击两次删除键，删除该人。

5. 如果当前有置灰的人，此时在列表中选择了一个新的人员，则置灰取消。

6. 点击搜索区域搜索人员，输入后显示搜索结果，搜索内容高亮，选择后在搜索区展示已选人员。

7. 人员单选，选择一个人员后，退出人员选择页面。

8. 人员多选，选择人员后，点击确定，退出人员选择页面。

9. 导航栏区域，人员多选，展示返回、清空、确定，三个按钮，人员单选，展示返回、清空两个按钮。点击按钮后退出人员选择页面

10. 搜索图标：选择区域有人时、搜索框获取焦点时均不显示图标

    ![weuser](img/userselct.png)

### API

TextArea props

| name              | description        | type                  | default |
| ----------------- | ------------------ | --------------------- | ------- |
| cls               | 自定义container css   | String                | ''      |
| style             | 自定义container style | Object                | {}      |
| title             | 标题                 | String                | ''      |
| singleSelect      | 是否为单选              | Boolean               |         |
| pop_type          | 弹层类型searchItem为筛选项 | String                |         |
| usersList         | 人员列表               | Array                 | []      |
| defaultUsers      | 默认人员列表             | Array                 | []      |
| selectedDatas     | 当前表单中已选中的人员             | Array                 | []      |
| fetchDefaultUsers | 请求默认人员列表回调         | Function              |         |
| fetchSearchUsers  | 搜索人员时回调           | Function(value)       |         |
| handleCancel      | 点击取消回调              | Function              |         |
| handleConfirm     | 点击确定回调               | Function(event, data) |         |
| onClearValue      | 点击清空回调             | Function              |         |
|                   |                    |                       |         |

---
_Source: https://npm.io/package/@beisen-cmps/ux-m-platform-user-select · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
