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

quark-input

v1.0.1

Published

一款可配置 的 input 组件

Downloads

3

Readme

input vue 组件

一款可配置 的 input 组件

组件参数

type

  1. email e-mail 地址的字段
  2. password 定义密码字段
  3. text 定义一个单行的文本字段
  4. tel 定义用于输入电话号码的字段 ... H5 规范中的都可以使用
<input-box  :type="'tel'"  :name="'user'">账号:</input-box>   

maxSize 最大字符限制 默认 100

reg 自定义正则匹配规则

<input-box  :reg="`^[0-9]`" :name="'user'">账号:</input-box>                   

inputStyle input 的样式修改

可以修改 input 的样式

inputBoxStyle 外面div的样式修改

修改外面盒子的包边

ruleName 默认提供一下名称

  1. email 邮箱 /^(?:[a-z0-9]+[_-+.]+)[a-z0-9]+@(?:([a-z0-9]+-?)[a-z0-9]+.)+([a-z]{2,})+$/

  2. tel 手机 /^(+86)?\s?0?(13|14|15|18|17)[0-9]{9}$/

  3. post 邮政编码 /^\d{6}$/

  4. cn 中文字符 /[\u4e00-\u9fa5]/

  5. idcard 身份证 /^\d{6}(18|19|20)?\d{2}(0[1-9]|1[012])(0[1-9]|[12]\d|3[01])\d{3}(\d|X)$/

  6. user 用户名 (15个中文|字符) ^[\u0026\u0023\u0031\u0038\u0033\u003b\u002e\u2022a-zA-Z\u4e00-\u9fa5]{1,15}$

  7. ip ip地址 /(25[0-5]|2[0-4]\d|[0-1]\d{2}|[1-9]?\d).(25[0-5]|2[0-4]\d|[0-1]\d{2}|[1-9]?\d).(25[0-5]|2[0-4]\d|[0-1]\d{2}|[1-9]?\d).(25[0-5]|2[0-4]\d|[0-1]\d{2}|[1-9]?\d)/

例子 验证手机

 <input-box :ruleName="'tel'" :type="'number'" @val="nameFun" :name="'user'">账号:</input-box>    

slot 提供 图片替换,但是要自己加样式

name='delete-icon' 删除图片替换 name='normal-icon' 右侧显示图片 ,我在密码模式下提供了一个图片,其实在什么模式下都可以显示,可以根据自己需要替换

@val 返回当前输入的值,和规则验证