# @beisen-platform/common-mount

> 平台通用挂载组件

Latest version **1.0.5** (published 2019-03-15) · ISC license · 0 weekly downloads

## Install

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

## 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.0.5 |
| Published | 2019-03-15 |
| First published | 2018-11-28 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 23.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | beisen |
| Maintainers | beisencorp |
| Keywords | beisen, react-component, es6 |

## Links

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

## Dependencies (2)

- [debounce](https://npm.io/package/debounce.md) ^1.1.0
- [@beisen-platform/common-func](https://npm.io/package/@beisen-platform/common-func.md)

## Recent versions

- 1.0.5 (latest) — 2019-03-15
- 1.0.4 — 2019-01-09
- 1.0.3 — 2019-01-08
- 1.0.2 — 2019-01-08
- 1.0.1 — 2019-01-03
- 0.1.2 — 2018-12-02
- 0.1.1 — 2018-11-28

## README

# CommonMount

### 挂载公共方法
- 组件构造函数中创建挂载容器

示例：

```
this.commonMount = new commonMount({
  containerId: 'AutoComplete_ul', // 容器ID
  follow: true, // 是否滚动跟随，默认true
  fixed: true　// 定位：fixed，false时为absolute
});

```


- 在需要挂载的时候传入挂载参数，RenderDOM

需要预先计算出挂载高度并传入

示例：

```
this.commonMount.renderDom(
  'auto-complete-wrap', // wrap's classname/id-name
  showAutoUl, // content dom
  this.refs.autoInput, // 滚动跟随节点
  [
    this.tar, //挂载节点
    { // 挂载元素宽高 {width: '', height: ''}
      width: autoResult && autoResult.offsetwidth,
      height: autoResultHeight
    }
  ],
  false,  //isInput,挂载节点为input
  140, //向左水平偏移的距离，为负 -140 则为向右偏移
  true //弹层靠左靠右模式，默认为false 靠左模式
);
```

- 关闭的时候可以卸载节点并取消事件监听

示例：

```
this.commonMount.unmountBox();
```

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