Git Product home page Git Product logo

antd-form-mate's Introduction

antd-form-mate

GitHub license npm Version GitHub stars GitHub issues GitHub commit activity

基于 ant design 的表单组件,配置化实现表单功能。

basic.png

基础表单项

advanced.png

高级表单项

安装

npm i -S antd-form-mate

开发

基于 Storybook 开发调试。

$ git clone https://github.com/theprimone/antd-form-mate.git
$ cd antd-form-mate
$ npm install
$ npm start

使用

可配置类型

  1. custom 自定义组件类型
  2. date 日期
  3. datetime 日期时间
  4. date-range 日期范围
  5. datetime-range 日期时间范围
  6. number
  7. select
  8. textarea
  9. password
  10. picture
  11. switch
  12. slider 滑动输入
  13. file-dragger
  14. string 默认类型
  15. location 地址录入,基于高德地图
  16. check-group 多选框
  17. radio-group 单选框

API

表单项

参数 说明 类型 默认值
type 上述类型 ComponentType 'string'
field 字段名 string -
formItemProps Form.Item 支持的配置,新增 dense 属性配置 Form.Item marginBottom 为 0 扩展 FormItemProps -
fieldProps 字段值配置 GetFieldDecoratorOptions -
componentProps 额外的组件配置 ComponentProps -
component 自定义的组件,仅当 type'custom' 时可用 React.ElementType -

未尽事宜,可参考 index.stories.tsx

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.