Giter VIP home page Giter VIP logo

snake-form-design's Introduction

项目

snake-form-design

截图展示

说明

表单设计器

React-dnd + React + Typescript + webpack5.x + ant design + dva

注意事项

需要单独引入 css


import 'snake-form-design/dist/index.css';

安装


npm install snake-form-design --save

yarn add snake-form-design

示例


import SnakeFormDesign from 'snake-form-design';
import 'snake-form-design/dist/index.css';

const App = () => (
  <>
    <SnakeFormDesign
      dataSource={dataSource}
      treeData={treeData}
      getWidgetsList={(widgetsList) => console.log(widgetsList)}
      getErrorsList={(errorsList) => console.log(errorsList)}
      getRemoveWidgetId={(id) => (function () { return ''; }())}
      height="calc(100vh - 84px)"
      title="snake-form-design"
    />
  </>
);

文档

字段 必填 描述
dataSource 原始控件列表数据
treeData 流程组件 - 选择流程 - 树数据
getWidgetsList 获取已配置控件列表
getErrorsList 获取已配置控件 - 表单错误数据列表
getRemoveWidgetId 删除已配置控件 - 输出 '控件 formKey', 接收 字符串 类型返回值,允许删除则为空字符串,否则为报错信息
height 表单设计器高度,默认 100vh
title 表单标题,默认 ‘未命名’

snake-form-design's People

Contributors

summersnake avatar

Watchers

 avatar

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.