# multi-items-input

> Vue Components. 类似邮箱地址栏的输入，自动提示补全，退格键删除，纯键盘操作可以快捷完成多项选择。

Latest version **1.0.3** (published 2022-09-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install multi-items-input
pnpm add multi-items-input
yarn add multi-items-input
bun add multi-items-input
```

## 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.3 |
| Published | 2022-09-30 |
| First published | 2019-11-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 1.4 MB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | Jwolf |
| Maintainers | jwolfcn |

## Links

- npm: https://www.npmjs.com/package/multi-items-input
- Homepage: https://jwolf.cn
- npm.io page: https://npm.io/package/multi-items-input

## Dependencies (5)

- [vue](https://npm.io/package/vue.md) ^2.6.10
- [core-js](https://npm.io/package/core-js.md) ^3.3.2
- [vue-popperjs](https://npm.io/package/vue-popperjs.md) ^2.3.0
- [@vue/test-utils](https://npm.io/package/@vue/test-utils.md) ^1.0.0-beta.29
- [throttle-debounce](https://npm.io/package/throttle-debounce.md) ^2.1.0

## Recent versions

- 1.0.3 (latest) — 2022-09-30
- 1.0.2 — 2022-09-30
- 1.0.1 — 2022-09-30
- 1.0.0 — 2022-09-30
- 0.2.0 — 2020-05-21
- 0.1.6 — 2020-05-11
- 0.1.5 — 2020-05-09
- 0.1.4 — 2019-11-21
- 0.1.3 — 2019-11-21
- 0.1.2 — 2019-11-21
- 0.1.1 — 2019-11-20
- 0.1.0 — 2019-11-19

## README

# multi-items-input

[![npm](https://img.shields.io/npm/v/multi-items-input.svg) ![npm](https://img.shields.io/npm/dm/multi-items-input.svg)](https://www.npmjs.com/package/multi-items-input)
[![vue2](https://img.shields.io/badge/vue-2.x-brightgreen.svg)](https://vuejs.org/)

You can select multiple items just with keyboard. Input some keywords and using ↓, ↑,*tab* or *enter* to select, *delete* to remove. 

[![header](https://jwolf.cn/uploads/1259098224027897856.gif)](https://www.npmjs.com/package/multi-items-input)

## Table of contents

- [Examples](#examples)
- [Installation](#installation)

# Examples

Project page

https://jwolfcn.github.io/vue-multi-items-input/


# Installation

```
npm install --save multi-items-input
```

## Usage

In your entry js,  *main.js*  mostly
```javascript
import Vue from 'vue'
import 'multi-items-input'
import 'multi-items-input/dist/multi-items-input.css'
```

Then you can use the tag  *multi-items-input*

```html
<multi-items-input
    :fetch="search"
    placeholder="placeholder"
    :height="100"
    separator=";"
    @select="select"
    @delete="onDelete"
    :selection-only="false"
></multi-items-input>
```
For more details, refer to the example directory.
## API

## Properties
| Property | Type | Default | Description |
|----------|------|---------|-------------|
| v-model | Array |  | Binding value. Each object within it should be like `{name: 'xx', id: xx}` |
| placeholder | String |  | Place holder of input. |
| separator | String |  | Separator between items. |
| height | Number | 100 | Height of the container. |
| fetch | Function(queryStr, done) || Triggered to request for suggestion. Keywords would passed as the first parameter. The second parameter is a callback function which notifys the request is completed. |
|trigger-on-focus|Boolean| true| Whether trigger the  fetch function on focus.|
|selection-only|Boolean| false| Whether the user should select from the suggestion.|
|zIndexOfPopper|Number| -| Set the z-index of the popper.|
|disabled|Boolean| false| Set input editable|


## Events
| event | Parameters | description |
|-------|------|-------------|
| delete | Array, Object | The first parameter is the array of the selected items. Second is the item which deleted. |
| select | Object, Array | The first parameter is the item added. Second is the array of the selected items.  |

## License

MIT © [Jwolf](https://jwolf.cn)

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