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 🙏

© 2026 – Pkg Stats / Ryan Hefner

formgenerate

v0.4.2

Published

### 表单生成器依赖于antd-vue ###主要props

Readme

formgenerate

表单生成器依赖于antd-vue

###主要props

  • formConfigList: <Array>表单配置
  • apiUrl: <String> submit时Post提交的ulr

####formConfigList由一个个表单元素数据组成,每种元素数据数据额结构如下

  • 文本
{
    type: 'text',   // 类型
    label: '第一题', // 表单label
    key: 'text',    // <String>数据key, 提交表单时,就是以此key的值作为表单数据的key
    placeholder: '请输入', // <String>
    maxLength: 30,  // <Number>允许输入的最大长度 
    help: '提示',   // 子弹气泡提示
    required: 1,   // 是否必填 1|0
    initValue: '张三',  // <String>初始化值 
}
  • 多行文本
{
    type: 'textarea',   
    label: '描述', 
    key: 'textarea',   
    placeholder: '请输入',
    maxLength: 30,  
    help: '提示',   
    required: 1,   
    initValue: '张三'  
}
  • Url
{
    type: 'url',   
    label: '网址', 
    key: 'url',    
    placeholder: '请输入',
    help: '提示',   
    required: 1,  
    initValue: 'https://www.baidu.com'
}
  • email
{
    type: 'email',   
    label: '邮箱', 
    key: 'email',    
    placeholder: '请输入',
    help: '提示',   
    required: 1,  
    initValue: '[email protected]'
}
  • 整数
{
    type: 'int',   
    label: '整数', 
    key: 'int',    
    placeholder: '请输入',
    maxValue: 10,  // <Number>最大值
    minValue: 2,   // <Number>最小值
    help: '提示',   
    required: 1,  
    initValue: 10 // <Number>
}
  • 颜色选择器
{
    type: 'color',   
    label: '颜色', 
    key: 'color',    
    help: '提示',   
    initValue: 10 // <String> #hex
}
  • 时间
{
    type: 'datetime',   
    label: '时间', 
    key: 'datetime',    
    help: '提示',  
    placeholder: '请选择', 
    initValue: '2020-10-01 20:10:10' // <String> YYYY-MM-DD HH:mm:ss
}
  • 开关
{
    type: 'boolean',   
    label: '开关', 
    key: 'boolean',    
    help: '提示',  
    initValue: 0 // <Number> 0|1
}
  • 单选
{
    type: 'radio',
    label: '选项',
    key: 'radio',
    optionList: [
        {
            value: 1,  // <String|Number>
            label: '选项A' // <String>
        },
        {
            value: 2,
            label: '选项B'
        },
        {
            value: 3,
            label: '选项C'
        },
        {
            value: 4,   
            label: '选项D'
        }
    ],
    help: '提示',
    initValue: 1 // <String|Number> optionList对应的value
}
  • 复选
{
    type: 'checkbox',
    label: '选项',
    key: 'checkbox',
    optionList: [
        {
            value: 1,  // <String|Number>
            label: '选项A' // <String>
        },
        {
            value: 2,
            label: '选项B'
        },
        {
            value: 3,
            label: '选项C'
        },
        {
            value: 4,   
            label: '选项D'
        }
    ],
    help: '提示',
    initValue: [1,3] // <String|Number>Array optionList对应的value
}
  • 图片
{
    type: 'image',
    label: '背景',
    key: 'image',
    maxFileSize: 50,     // <Number>文件尺寸限制Mb
    maxFileNum: 1,    // <Number>文件个数限制
    help: '图片',
    initValue: [
        {
            fileName: '伟东云.png',    // <String>文件名
            ossEtag: '98C03CB5BF6BD55495E94BCCA7068C35', // <String>OssEtag
            url: 'http://cdn-apaas.wdcloudnet.com/test/module/img/伟东云.png' // <String> 资源访问地址
        }
    ]
}