# @beisen-platform/dropdown

> 平台搜索下拉组件

Latest version **1.1.9-rc.6** (published 2019-11-06) · ISC license · 0 weekly downloads

## Install

```sh
npm install @beisen-platform/dropdown
pnpm add @beisen-platform/dropdown
yarn add @beisen-platform/dropdown
bun add @beisen-platform/dropdown
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.9-rc.6 |
| Published | 2019-11-06 |
| First published | 2018-11-28 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 9 |
| Unpacked size | 63.8 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | beisen |
| Maintainers | beisencorp |
| Keywords | beisen, react-component, es6 |

## Links

- npm: https://www.npmjs.com/package/@beisen-platform/dropdown
- Repository: http://gitlab.beisencorp.com/ux-cnpm/ux-drop-down
- npm.io page: https://npm.io/package/@beisen-platform/dropdown

## Dependencies (9)

- [uuid](https://npm.io/package/uuid.md) ^3.3.2
- [@beisen-phoenix/button](https://npm.io/package/@beisen-phoenix/button.md) ^1.0.37
- [@beisen-phoenix/search](https://npm.io/package/@beisen-phoenix/search.md) 1.0.10
- [@beisen-phoenix/tooltip](https://npm.io/package/@beisen-phoenix/tooltip.md) 1.0.31
- [@beisen-platform/search](https://npm.io/package/@beisen-platform/search.md)
- [@beisen-phoenix/checkbox](https://npm.io/package/@beisen-phoenix/checkbox.md) 1.0.16
- [@beisen-platform/base-button](https://npm.io/package/@beisen-platform/base-button.md)
- [@beisen-platform/common-func](https://npm.io/package/@beisen-platform/common-func.md)
- [@beisen-platform/react-icons](https://npm.io/package/@beisen-platform/react-icons.md)

## Recent versions

- 1.1.9-rc.6 (latest) — 2019-11-06
- 1.1.9-rc.5 — 2019-10-25
- 1.1.9-rc.4 — 2019-09-20
- 1.1.9-rc.3 — 2019-08-14
- 1.1.9-rc.2 — 2019-08-08
- 1.1.9-rc.1 — 2019-08-06
- 1.1.9 — 2019-07-12
- 1.1.8 — 2019-07-11
- 1.1.7 — 2019-07-10
- 1.1.6 — 2019-07-08
- 1.1.5 — 2019-06-12
- 1.1.4 — 2019-06-05
- 1.1.3 — 2019-06-05
- 1.1.2 — 2019-06-03
- 1.1.1-rc.2 — 2019-06-03
- … 15 more at https://npm.io/package/@beisen-platform/dropdown/versions

## README

# drop-down 使用说明

## 项目运行

1. cnpm install 或 npm install cnpm使用教程

2. npm run dev （开发环境打包 port:8080）

3. npm run test （测试用例）

4. npm run build （生产环境打包）

## drop-down参数

```javascript
const props = {
  /**
   * input框前的文字标识，可为空
   */
  title: '测试',

  /**
   * 下拉菜单为单选或者多选
   * true  多选
   * false 单选(默认)
   */
  multiple: true,

  /**
   * 是否显示搜索框
   */
  hasSearch: false,

  hiddenTip: false,

  /**
   * 信息是否左右显示
   */
  sideTip: false,

  /**
   * 限制选择数量
   * 当超过该数量后，其它的则禁用
   */
  limitCount: 5,

  /**
   * 每项的内容
   */
  children: [
    {
      value: 0,
      text: '查看详情',
      isActive: false,
      isChecked: true,
      tipText: "哎哎多撒多撒<br/>多撒多撒多所"  //如果有该字段，则鼠标移入文字会一直显示tip,tip内容为该字段内容

    }
  ],

  /**
   * 是否显示
   */
  hidden: false,

  /**
   * 是否使用模板下拉（空内容的弹层）
   */
  templateDrop: true,

  /**
   * 自定义模板弹层内容
   */
  templateComponent: [<div onClick={this.clickLi}>111</div>, <div>111</div>],

  /**
   * 弹层宽度
   * 外部传入，最小为170px
   */
  dropdownWidth: '500px',

  /**
   * 弹层最大高度
   */
  maxHeight: '',

  /**
   * 点击后事件回调
   * @param event 事件
   * @param val 抛出的值（单选为对象，多选为数组）
   */
  onClick: function (event, val, sortVal) { console.log(val); }

}
```

## drop-down调用方法

1.安装npm组件包

```
npm install @beisen/drop-down --save-dev
```

2.引用组件

  ```javascript
import DropDown from "@beisen/drop-down"
  ```


3. 传入参数

	该参数为上述参数，传入方式使用: {...参数}
	```javascript

	render () {
			return (
				<DropDown {...data} />
			)
		}
	```

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