All Projects → duan602728596 → Antd Schema Form

duan602728596 / Antd Schema Form

Licence: mit
Based on Ant Design, interactive forms can be generated through JSON Schema configuration. - 基于Ant Design,可以通过JSON Schema配置生成可交互的表单。

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Antd Schema Form

React Antd Todo
A simple todo list app built with React, Redux and Antd - Ant Design
Stars: ✭ 42 (-69.34%)
Mutual labels:  antd, ant-design, ant
Ant Design Vue
🌈 An enterprise-class UI components based on Ant Design and Vue. 🐜
Stars: ✭ 15,749 (+11395.62%)
Mutual labels:  antd, ant-design, ant
Fc Angular
快速搭建angular后台管理系统的admin template。Fast development platform based on angular8, ng.ant.design built multi-tab page background management system (continuous upgrade) ^_^
Stars: ✭ 171 (+24.82%)
Mutual labels:  antd, ant-design, ant
Vue Antd Admin
🐜 Ant Design Pro's implementation with Vue
Stars: ✭ 2,766 (+1918.98%)
Mutual labels:  antd, ant-design, ant
picker
📅 All Date Pickers you need.
Stars: ✭ 185 (+35.04%)
Mutual labels:  react-component, antd, ant-design
React Redux Antdesign Webpack Starter
react + redux + ant design + react-router 4 + webpack 4 starter
Stars: ✭ 44 (-67.88%)
Mutual labels:  antd, ant-design, ant
Ant Plus
🔺 Ant Design 表单简化版
Stars: ✭ 212 (+54.74%)
Mutual labels:  antd, form, ant-design
Form Render
🚴‍♀️ 阿里飞猪 - 很易用的中后台「表单 / 表格 / 图表」解决方案
Stars: ✭ 3,881 (+2732.85%)
Mutual labels:  ant-design, ant, form
antd-form-mate
📦 基于 ant design 的表单组件,配置化实现表单功能。
Stars: ✭ 14 (-89.78%)
Mutual labels:  form, antd, ant-design
react-antd-formutil
Happy to use react-formutil in the project based on ant-design ^_^
Stars: ✭ 16 (-88.32%)
Mutual labels:  react-component, antd, ant-design
Ng Zorro Antd
Angular UI Component Library based on Ant Design
Stars: ✭ 7,841 (+5623.36%)
Mutual labels:  antd, ant-design, ant
Ng Zorro Antd Mobile
A configurable Mobile UI components based on Ant Design Mobile and Angular. 🐜
Stars: ✭ 709 (+417.52%)
Mutual labels:  antd, ant-design, ant
Virtual List
🧾 React Virtual List Component which worked with animation
Stars: ✭ 232 (+69.34%)
Mutual labels:  antd, react-component, ant-design
Sunflower
🦹 Process components for antd4 & antd3 by alipay industry technology
Stars: ✭ 441 (+221.9%)
Mutual labels:  antd, react-component, ant-design
React Antd Admin
用React和Ant Design搭建的一个通用管理后台
Stars: ✭ 1,313 (+858.39%)
Mutual labels:  antd, ant-design, ant
Ant Design Pro
👨🏻‍💻👩🏻‍💻 Use Ant Design like a Pro!
Stars: ✭ 30,909 (+22461.31%)
Mutual labels:  antd, ant-design
Ant Design Blazor
Enterprise-class UI components based on Ant Design and Blazor.
Stars: ✭ 39 (-71.53%)
Mutual labels:  antd, ant-design
Reactspa
combination of react teconology stack
Stars: ✭ 911 (+564.96%)
Mutual labels:  antd, form
Pro Components
🏆 Use Ant Design like a Pro!
Stars: ✭ 1,039 (+658.39%)
Mutual labels:  ant-design, ant
Awesome Uikit
Collect JS Frameworks, Web components library and Admin Template.
Stars: ✭ 1,136 (+729.2%)
Mutual labels:  antd, ant-design

antd-schema-form

NPM version NPM version NPM version NPM version

中文文档

Antd-schema-form based Ant Design, quickly generate interactive forms with JSON Schema configuration.

This [Demo] (https://duan602728596.github.io/antd-schema-form/#/) simply shows how to construct a form by configuring schema.json.

Start using

  1. Before using, you need to configure antd in the babel on-demand loading.
  2. You need to configure the babel-loader as follows:
{
  test: /node_modules[\\/]antd-schema-form[\\/].*\.jsx?$/,
  use: [
    {
      loader: 'babel-loader',
      options: {
        plugins: [
          [
            'import',
            {
              libraryName: 'antd',
              libraryDirectory: 'es',
              style: 'css'
            }
          ]
        ]
      }
    }
  ]
}
  1. React version >=16.7.0.
  2. Use of components:
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import SchemaForm, {
  getKeysFromObject,  // Get all the keys under schema.json
  getObjectFromValue, // Object formatted into the value required by the form
  getValueFromObject  // The value of the form obtained from the form, formatted into an object
} from 'antd-schema-form';
import 'antd-schema-form/style/antd-schema-form.css'; // Introducing style

// json schema
const json = {
  id: '$root',
  type: 'object',
  title: '$root',
  properties: {}
};

ReactDOM.render(
  <SchemaForm json={ json } />,
  document.getElementById('app')
);

API

Parameter Description Type
json Json schema, required. object
value Form value. object
onOk Form confirmation event. (form: object, value: object, keys: Array<string>) => void
onCancel Form cancellation event. (form: object, keys: Array<string>) => void
okText Confirm button text. string
cancelText Cancel button text. string
footer Custom bottom content, onOk event reference (form: object) => React.Node
customComponent Custom rendering component, reference object
customTableRender Custom table column rendering component, reference object
languagePack Language configuration, reference object
formOptions Options of Form, reference object

Json schema configuration

Custom rendering component

Load components as needed

Development and testing

  • Run the command npm run dev, enter http://127.0.0.1:5050 in the browser to view the demo and develop.
  • Run the command npm run build and npm run test, and run http://127.0.0.1:6060 in the browser to run the test case.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].