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

antd-pc-form-package

v1.0.30

Published

基于antd的pc端的form表单

Downloads

52

Readme

Coding......

antd-pc-form-package

Through the strategy pattern, the form encapsulation is designed to simplify the development difficulty of antd-design on PC.

Target Plan

| Form Type Plan | Progress | Version | |:---------------|:---------|:--------| | Input | done | v1.0.0 | | Number Input | done | v1.0.0 | | Radio | done | v1.0.0 | | Checkbox | done | v1.0.0 | | Select | done | v1.0.0 | | Switch | done | v1.0.0 | | Date Picker | done | v1.0.0 | | Tree Select | coding | | | ... | | |

Dependency

$ npm install antd --save-dev

Usage

$ npm install antd-pc-form-package
import {FormPackage} from "antd-pc-form-package";

<FormPackage dataSource={dataSource} getFormValues={this.getFormValues}/>

dataSource

{ 
    key: 1,
    type: 1,
    name: 'name',
    label: 'name', 
    value: '', 
    placeholder: 'input name', 
    rules: [
        {required: true, message: 'input name'},
    ], 
    icon: <Icon type="user" style={{ color: 'red' }} />,
},

| Property | Description | Type | Default | Required | |:------------|:-----------------------------------------|:----------------------------|:------------------------------------------------|:---------| | key | Unique identification number | Number | | True | | type | Form type | String | INPUT | False | | name | Name | String | | True | | label | | String | | False | | value | | Number | string | Boolean | | False | | placeholder | | String | FormItem._placeholder | False | | rules | | Object | {required: true, message:FormItem._placeholder} | False | | icon | | Component | | False | | trigger | Validate trigger | String | 'onBlur' | False | | source | radio, checkbox, select etc must be need | Array[] | | False |

'type' enumerations

| Type | Description | |:-------------|:------------| | INPUT | 文本输入框 | | NUMBER_INPUT | 数字输入框 | | RADIO | 单选框 | | CHECKBOX | 多选框 | | SELECT | 下拉框 | | SWITCH | 开关 | | DATE_PICKER | 日期选择框 | | TREE_SELECT | 树选择器 |

API

| Property | Description | Type | Default | Version | |:--------------|:----------------|:-----------------|:--------|:---------| | dataSource | form configs | object | | v1.0.0 | | getFormValues | get form values | Function(values) | | v1.0.0 |

Contact

  • Email: [email protected]
  • Github: https://github.com/houchaowei/antd-pc-form-package
  • Issues: https://github.com/houchaowei/antd-pc-form-package/issues