# ele-custom-select

> element-ui select组件改造

Latest version **1.0.2** (published 2019-04-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install ele-custom-select
pnpm add ele-custom-select
yarn add ele-custom-select
bun add ele-custom-select
```

## 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.2 |
| Published | 2019-04-10 |
| First published | 2019-04-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 1.2 MB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | hudonghui |
| Maintainers | hudonghui |

## Links

- npm: https://www.npmjs.com/package/ele-custom-select
- npm.io page: https://npm.io/package/ele-custom-select

## Dependencies (2)

- [vue](https://npm.io/package/vue.md) ^2.5.11
- [element-ui](https://npm.io/package/element-ui.md) ^2.7.2

## Recent versions

- 1.0.2 (latest) — 2019-04-10
- 1.0.1 — 2019-04-10
- 1.0.0 — 2019-04-10

## README

# ele-custom-select

> 基于elementUI select组件改造的custom-select组件。
> 
> 主要功能为：
>
> 1. 可输入code回车选中对应值（只能定位value，需要label和value一致）
> 
> 2. 可输入选项不存在的值 表单提交时当做新增元素提交

## install & Usage

``` bash
# install dependencies
npm install ele-custom-select

# Usage
import customSelect from 'ele-custom-select'
Vue.use(customSelect)

# use in page
<el-form-item label="性别" prop="gender">
    <custom-select v-model="formData.gender">
        <el-option v-for="item in gender" :key="item.value" :value="item.value" :label="item.label" :code="item.code">{{item.label}}[{{item.code}}]</el-option>
    </custom-select>
</el-form-item>

<script>
    export default {
        data() {
            return {
                formData: {
                    gender: '',
                },
                gender: [
                    {
                        value: "F",
                        label: "女",
                        code: "F"
                    },
                    {
                        value: "M",
                        label: "男",
                        code: "M"
                    },
                    {
                        value: "0",
                        label: "不详",
                        code: "0"
                    }
                ],
            }
        }
    }
</script>
```

## Operation
``` bash

鼠标点击输入框聚焦，可输入对应编码或新增内容，鼠标点击箭头可展开/收起选项列表
```

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