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

betterform

v1.4.0

Published

ant design form packaging

Downloads

1

Readme

btform

let radiogroup1 = [<Radio key='1' value='download'>下载</Radio>,<Radio key='2' value='jump'>浏览器打开</Radio>]
    let radiogroup2 = [<Radio key='1' value={0}>不推荐</Radio>,<Radio key='2' value={1}>推荐</Radio>]
    let radiogroup3 = [<Radio key='1' value={0|'0'}>禁用</Radio>,<Radio key='2' value={1}>不禁用</Radio>]
    let creatData = {
      verification_cb : (data) => {
        if(_item.add){
          data.software_id = id
          callApi(`v1/tools-recommends`,'POST',data).then(res => {
            self.getList()
            this.setState({
              visible: false
            });
            message.success('添加成功')

          })
        }else {
          callApi(`v1/tools-recommends/${_item.id}`,'put',data).then(res => {
            let _index = list.findIndex((item) => {
              return item.id === res.id
            });
            list[_index] = res
            this.setState({
              visible: false,
              list
            });
            message.success('编辑成功')

          })
        }

      },
      data: [
        {
          label:'名称',
          gFDid:'name',
          hasFeedback:true,
          gFDdata:{rules: [
              { required: true, message: '请输入您推荐的工具名称!' },
            ],
            initialValue: _item.name ? _item.name : ''
          },
          tagName:'Input',
          tagData:{},
          child:null
        },
        {
          label:'图片',
          gFDid:'image',
          hasFeedback:true,
          gFDdata:{rules: [
              { required: true, message: '请输入您的图片地址!' },
            ],
            initialValue: _item.image ? _item.image : ''
          },
          tagName:'Input',
          tagData:{},
          child:null
        },
        {
          label:'url',
          gFDid:'url',
          hasFeedback:true,
          gFDdata:{rules: [
              { required: true, message: '请输入您的下载地址!' },
            ],
            initialValue: _item.url ? _item.url : ''
          },
          tagName:'Input',
          tagData:{},
          child:null
        },
        {
          label:'打开方式',
          gFDid:'jump_type',
          gFDdata:{rules: [
              { required: true },

            ],
            initialValue: _item.jump_type ? _item.jump_type : 'download'
          },
          tagName:'RadioGroup',
          tagData:{},
          child:radiogroup1
        },
        {
          label:'排序',
          gFDid:'sort',
          extra:'倒序,数字大的靠前',
          gFDdata:{
            initialValue: _item.sort ? _item.sort : ''
          },
          tagName:'Input',
          tagData:{},
          child:null,
          formItemLayout:{
                                 labelCol: { span: 4 },
                                 wrapperCol: { span: 16 }                         }
        },
        {
          label:'描述',
          gFDid:'describe',
          gFDdata:{
            initialValue: _item.describe ? _item.describe : ''
          },
          tagName:'Input',
          tagData:{},
          child:null
        },
        {
          label:'推荐图标',
          gFDid:'top_icon',
          gFDdata:{
            initialValue: _item.top_icon ? _item.top_icon : ''
          },
          tagName:'Input',
          tagData:{},
          child:null
        },
        {
          label:'是否推荐',
          gFDid:'recommend',
          gFDdata:{rules: [
              { required: true },
            ],
            initialValue: _item.recommend != undefined ? _item.recommend : 1
          },
          tagName:'RadioGroup',
          tagData:{},
          child:radiogroup2
        },
        {
          label:'事件',
          gFDid:'timeRange',
          gFDdata:{rules: [
              { required: true },
            ],
            initialValue: []
          },
          tagName:'RangePicker',
          tagData:{format:{dateFormat},allowClear:false},
          child:null
        },
        {
          label:'是否禁用',
          gFDid:'status',
          gFDdata:{rules: [
              { required: true },
            ],
            initialValue: _item.status != undefined ? _item.status : 1
          },
          tagName:'RadioGroup',
          tagData:{},
          child:radiogroup3
        },
        {
          tagName:'Button',
          tagData:{type:'primary',htmlType:'submit'},
          child:'提交'
        }
      ],
      formItemLayout: {
        labelCol: { span: 4 },
        wrapperCol: { span: 16 },
        layout="inline"
      },
      addElement: [<Button type="primary" onClick={this.add.bind(this,{})} style={{marginBottom:'8px'}}>支持插入自定义元素</Button>]
    }