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

element-ui-verify

v1.2.6

Published

如果你受够了饿了么ElementUI原生的校验方式,那就来试试它吧!一款更懂你的校验插件

Downloads

178

Readme

element-ui-verify

如果你受够了饿了么 ElementUI 原生的校验方式,那就来试试它吧!

前言

饿了么 ElementUI 虽好,但表单校验的体验不够理想

如果说产品开发要讲究用户体验,那插件开发也要讲究开发体验,而好的开发体验,要靠好的 api 设计来保障

本人专注校验插件开发 30 年,有祖传的校验插件 api 设计(玩笑)。主要是参考了之前写的vue-verify-pop的 api,并加以完善,取其精华,去其糟粕,揉和日月之精华。。。

本插件只是对 ElementUI 原本的校验方式做了一层封装,核心的校验器仍然是async-validator,非侵入式,完全不会影响你继续使用 ElementUI 的原生校验

示例

<template>
  <el-form label-width="100px" :model="model">
    <el-form-item label="年龄" prop="age" verify int :gt="0">
      <el-input v-model="model.age"></el-input>
    </el-form-item>
  </el-form>
</template>
<script>
  export default {
    data() {
      return {
        model: {
          age: ""
        }
      };
    }
  };
</script>

ok,你已经完成了一个内容为大于 0 的整数校验!(欢迎对比官方版的相似例子)

文档

https://aweiu.com/documents/element-ui-verify/