New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

multi-items-input

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

multi-items-input

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

latest
npmnpm
Version
1.0.3
Version published
Maintainers
1
Created
Source

multi-items-input

npm npm vue2

You can select multiple items just with keyboard. Input some keywords and using ↓, ↑,tab or enter to select, delete to remove.

header

Table of contents

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

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

<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

PropertyTypeDefaultDescription
v-modelArrayBinding value. Each object within it should be like {name: 'xx', id: xx}
placeholderStringPlace holder of input.
separatorStringSeparator between items.
heightNumber100Height of the container.
fetchFunction(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-focusBooleantrueWhether trigger the fetch function on focus.
selection-onlyBooleanfalseWhether the user should select from the suggestion.
zIndexOfPopperNumber-Set the z-index of the popper.
disabledBooleanfalseSet input editable

Events

eventParametersdescription
deleteArray, ObjectThe first parameter is the array of the selected items. Second is the item which deleted.
selectObject, ArrayThe first parameter is the item added. Second is the array of the selected items.

License

MIT © Jwolf

FAQs

Package last updated on 30 Sep 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts