Skip to content

FaberSober/react-form-editor

Repository files navigation

react-form-editor

Made with create-react-library

NPM JavaScript Style Guide

Still In Working Progress

Example

https://FaberSober.github.io/react-form-editor

Form Edit Panel Form Edit Panel

Form Show Panel Form Show Panel

Install

npm install --save react-form-editor

Usage

import React, { Component } from 'react'

import FormEditPanel from 'react-form-editor'
import 'react-form-editor/dist/index.css'

class Example extends Component {
  render() {
    return <FormEditPanel />
  }
}

Export Form JSON

[
  {
    id: 'abcdefgh', // 8位随机字母ID
    type: 'Input', // form组件类型
    label: '单行文本', // form组件Label标签
    layout: { w: 12, h: 1 } }, //  组件布局(网格布局,分为12格):w-宽/h-高
    options: [
      { label: 'A', value: 'A' },
    ], // 多选组件候选项
    properties: {

    }, //  组件补充配置属性
  },
]

License

MIT © FaberSober

About

react-form-editor based on ant-design自定义表单编辑器

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published