# el-select-tree-pangubpm

> ElementUI's el-select combined with el-tree.

Latest version **1.1.4** (published 2021-09-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install el-select-tree-pangubpm
pnpm add el-select-tree-pangubpm
yarn add el-select-tree-pangubpm
bun add el-select-tree-pangubpm
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.1.4 |
| Published | 2021-09-03 |
| First published | 2021-09-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 19.9 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 185 |
| Author | pangubpm.com |
| Maintainers | pangubpm |
| Keywords | el-select, el-tree, select-tree |

## Links

- npm: https://www.npmjs.com/package/el-select-tree-pangubpm
- Repository: https://github.com/yujinpan/el-select-tree
- Homepage: https://github.com/yujinpan/el-select-tree#readme
- Issues: https://github.com/yujinpan/el-select-tree/issues
- npm.io page: https://npm.io/package/el-select-tree-pangubpm

## Dependencies (5)

- [vue](https://npm.io/package/vue.md) ^2.6.10
- [core-js](https://npm.io/package/core-js.md) ^2.6.5
- [element-ui](https://npm.io/package/element-ui.md) ^2.4.5
- [style-inject](https://npm.io/package/style-inject.md) ^0.3.0
- [vue-runtime-helpers](https://npm.io/package/vue-runtime-helpers.md) ^1.1.2

## Recent versions

- 1.1.4 (latest) — 2021-09-03
- 1.1.3 — 2021-09-03

## README

# el-select-tree

ElementUI's el-select combined with el-tree.

- Online examples [https://yujinpan.github.io/el-select-tree/](https://yujinpan.github.io/el-select-tree/)

## Usage

### Install

```
npm install --save el-select-tree
```

### Require element-ui

If your project does not use element-ui,
you need to introduce a separate element-ui package, like this:

```js
import 'el-select-tree/lib/element-ui';
```

### Global registration

```js
import Vue from 'vue';
import ElSelectTree from 'el-select-tree';

Vue.use(ElSelectTree);
```

### In-component registration

```js
import ElSelectTree from 'el-select-tree';

export default {
  components: {
    ElSelectTree
  }
};
```

### Complete example

```vue
<template>
  <el-select-tree
    width="120px"
    placeholder="请选择内容"
    :data="treeData"
    v-model="value"
  ></el-select-tree>
</template>

<script>
import ElSelectTree from 'el-select-tree';

export default {
  components: {
    ElSelectTree
  },
  data() {
    return {
      value: 2,
      treeData: [
        {
          value: 1,
          label: 'text1',
          children: [{ value: 5, label: 'text5' }, { value: 6, label: 'text6' }]
        },
        { value: 2, label: 'text2' },
        { value: 3, label: 'text3' },
        { value: 4, label: 'text5' }
      ]
    };
  }
};
</script>
```

## Component API

### Attributes

| name            | type      | description                                                           |
| --------------- | --------- | --------------------------------------------------------------------- |
| `value/v-model` | `*/*[]`   | bound value, the type must be array if attribute's `multiple` is true |
| `multiple`      | `boolean` | multiple selection, default: `false`                                  |
| `placement`     | `string`  | extends ElementUI placement, default: `bottom-start`                  |
| `size`          | `string`  | extends ElementUI size, default: `small`                              |
| `disabled`      | `boolean` | selection disabled, default: `false`                                  |
| `placeholder`   | `string`  | placeholder text, default: '请选择'                                   |
| `clearable`     | `boolean` | cleanup options, default: `false`                                     |
| `popover-width` | `number`  | popover's width                                                       |

#### Extends ElTree

- `data` default: `[]`
- `props` default: `{ value: 'value', label: 'label', children: 'children', disabled: 'disabled', isLeaf: 'isLeaf' }
- `node-key`
- `default-expand-all`
- `check-strictly`
- `lazy`
- `load`
- `icon-class`
- `indent`
- `accordion`
- `filter-node-method`
- `auto-expand-parent`
- `render-content`
- `render-after-expand`

See details: https://element.eleme.io/#/zh-CN/component/tree#attributes

### Events

- `change(value)` options change, return changed value
- `clear()` clear selected

---
_Source: https://npm.io/package/el-select-tree-pangubpm · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
