npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

vue-tag-fields

v1.2.2

Published

operable input box with tag in vue

Downloads

32

Readme

vue-tag-fields

NPM version build status Test coverage

简介

带tag标签的可增删改的vue input输入框样式的组件

使用

NPM

// Vue.use引入
import TagFields from 'vue-tag-fields';
Vue.use(TagFields);

// 组件自定义引入
import { TagFields } from 'vue-tag-fields';
<tag-fields v-model="data"></tag-fields>

操作

新增tag:输入完成后回车增加
修改tag:点击tag出现输入框,修改完成后回车确定修改。

API

属性

|属性|说明|类型|默认值|
|---|--|--|--| |v-model|双向绑定的值,数组中的值需要为String类型|Array|[]| |placeholder|占位文本|String|-| |disabled|是否禁用|Boolean|false| |ready-only|给定的初始值仅可读,不能修改或删除|Boolean|false| |allow-duplicates|是否允许出现重复的值,如果重复则无法添加|Boolean|true| |onblur-append|输入框失去焦点时,是否添加当前输入字符|Boolean|false| |max-tag-length|tag最多可以有多少个|Number|- |before-change|用于数据添加前的钩子函数,返回添加的valueindex,该函数应该返回truefalse,表示是否应用添加。当删除元素的时候,value值为undefined。用于自定义校验时,不要设置ready-onlymax-tag-length属性|Function|-|

方法

|方法名|说明|返回值| |--|--|--| |change|数据改变时触发|操作的值value、下标index、当前值data|