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-email-address

v1.0.5

Published

A can inserted, edited, saved based on vue2.0, similar to QQ mailbox, 163 mailbox email address component

Downloads

12

Readme

介绍

A can be inserted, edited, saved based on vue2.0, similar to QQ mailbox, 163 mailbox email address component(一个可以编辑,插入,删除的邮件地址组件,类似于qq邮箱,163邮箱,双击可以编辑,失焦自动保存)

安装

npm i vue-email-address -S

or

yarn add vue-email-address 

使用

  • 在main.js中
import Vue from 'vue'

import EmailAddress from 'vue-email-address'
import 'vue-email-address/dist/EmailAddress.css'

Vue.use(EmailAddress)
  • 在组件中
<template>
  <div class="home">
    <email-address
      v-model="list"
      @onInput="handleInput"
      @onBlur="handleBlur"
    />
  </div>
</template>

<script>

export default {
  name: 'Home',
  data () {
    return {
      list:['[email protected]','[email protected]']
    }
  },
   methods: {
    handleInput(currentEmail,emailList){
      console.log(currentEmail);
      console.log(emailList);
    },
    handleBlur(currentEmail,emailList){
      if(/[\u4e00-\u9fa5]+/.test(currentEmail)){
        alert('不支持汉字')
        return false
      }
      console.log(emailList);
    }
  }
}
</script>
<style lang="scss">

</style>

|props|说明|type|默认值| |--|--|--|--| |v-model的值|传入邮件组件的初始值|Array|[]| |onInput|邮件组件更新输入或者插入新值时触发的事件|Function(当前的邮件数据,索引,邮件列表)|null| |onBlur|邮件组件内部失焦时触发的事件|Function(当前的邮件数据,邮件列表)|null|

  • 注:对于onBlur事件,可以自定义校验规则和相关逻辑,但必须显示的指定返回值返回false,则终止更新列表数据,返回true,则正常更新列表值
  • 效果 result