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

miniprogram-wo-form

v1.0.6

Published

小程序自定义组件-表单

Readme

miniprogram-wo-form

小程序自定义组件-表单

使用

  1. 安装依赖:
npm install miniprogram-wo-form -D
npm install miniprogram-wo-loading -D
  1. 执行小程序开发工具: 工具-npm 构建 会在当前目录下出现miniprogram_npm目录
  2. 引用
{
  "usingComponents": {
    "wo-form": "/miniprogram_npm/miniprogram-wo-form/index"
  }
}
  1. 属性
  • formEls
 /**
     * 表单元素列表【各属性值后续增加】, 默认值为示例中的值
     * 除了elType 其余属性设置同官网原生组件设置
     * formEls[{
     *  elType: 'input',  // 值 input checkbox button  captchaMsg captchaImg:暂时没有
     *  type: 'text', // text  number  idcard digit
     *  placeholder: '', 
     *  required: true, //是否必填 
     *  password: false,  // 是否是密码类型
     *  emptyMsg: '', // 必填项为空时报错信息,未配置时同 placeholder
     *  describe:'', // 最右边的描述
     *  label: '',
     *  value: '',
     *  disabled: false,
     *  verifyType: '', // 默认是表单name
     *  maxlength: 140, // 最大输入长度,设置为 -1 的时候不限制最大长度
     *  name: '',
     *  bindinput: () => {}
     * },
     * {
     *  elType: 'captchaMsg',
     *  required: true, //是否必填 是否是密码类型
     *  phone: '', //手机号
     *  emptyMsg: '', // 必填项为空时报错信息,未配置时同 placeholder
     *  verifyType: '', // 默认是表单name
     *  voiceAPI: { // 语音api
     *    url: '',
     *    data: {}
     *  },
     *  msgAPI: { // 短信api
     *    url: '',
     *    data: {}
     *   },
     *  name: '',
     *  label: ''
     * },
     * {
     *  elType: 'button',
     *  formType: 'submit',
     *  submit: (data) => {}, // 提交函数
     *  success: (res) => {},
     *  fail: (res) => {},
     *  complete: () => {} // > ps:暂未实现
     *  sumitFun: () => {} // 提交
     *  value: ''
     *  
     * }]
     * 
     */
  • formTpl
 { // 目前只有两种模板 template1登录类似   template2预约确认类似
      type: String,
      value: 'template1'
},
  • formStatus
 { // 表单状态 false 按钮样式 btn-disable
    type: Boolean,
    value: true
}
  • apis
 /**
    * 表单提交请求
    * 数据格式{
    * url:'',
    * data:{}
    * }
    */
  • isCaptchaImg
{ // 为了减少循环次数,由使用者配置短信表单formEls配置下标, 未配置则证明该表单没有短信
    type: Number,
    value: -1
}
  • isCaptchaMsg
{ // 为了减少循环次数,由使用者配置图片验证码formEls配置下标, 未配置则证明该表单没有短信
    type: Number,
    value: -1
}